Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

Merge PR #585: Launcher: let go of the tiles when memory is short and Home is hidden

Gathin23e21a3eb9f4fb
diff --cc launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index 69d58aef9,27c44fe76..4037d0e2a
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@@ -202,8 -193,8 +202,10 @@@ public class MainActivity extends Activ
private boolean promptsPaused;
/** Rebuild the tiles on resume: Home was fully hidden by an app, or Home was pressed. Not after a side panel such as Wi-Fi settings. */
private boolean rebuildOnResume = true;
+ /** Between onStop and onStart: Home was fully covered by an app, not just by the translucent quick panel. */
+ private boolean stopped;
+ /** Between onStart and onStop: Home is (at least partly) on screen. */
+ private boolean started;
/** The Inputs or Module cards dropdown while one is open, so onPause can close it. */
private PopupWindow openPopup;
/** Reorder mode is on (top-bar button). */
@@@ -608,7 -590,7 +610,8 @@@
@Override
protected void onStart() {
super.onStart();
+ stopped = false;
+ started = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
registerReceiver(packageReceiver, packageFilter, Context.RECEIVER_NOT_EXPORTED);
registerReceiver(timeReceiver, timeFilter, Context.RECEIVER_NOT_EXPORTED);