Skip to content

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

launcher: Down from the top buttons returns to the dock tile you came from

Aleksander Sandnes7d0c1c8dd5cc
diff --git a/README.md b/README.md
index d49efe57e..10274296d 100644
--- a/README.md
+++ b/README.md
@@ -174,7 +174,7 @@ network, no background services. It needs JDK 17 and Android SDK platform 34 to
- **Clock screensaver**: a drifting clock over the glow, so nothing burns in. Pick "Clock" in the TV's screensaver settings, or over ADB:
`tools/tv.py 'settings put secure screensaver_components com.gathin.tvhome/.ClockDream; settings put secure screensaver_enabled 1'`
- **Remote keys**: an optional accessibility service keeps the remote's Input button working on Google TV (`INPUT_KEY_SERVICE=1` at install), another fixes sticks whose Home key sends ALL_APPS (`HOME_KEY_SERVICE=1`).
-- **Navigation** is deliberate: Up and Down move one row, the top buttons never fall through to tiles, the last focused app is remembered, and installing or removing an app refreshes the tiles while Home is open.
+- **Navigation** is deliberate: Up and Down move one row, the top buttons never fall through to tiles and Down from them returns to the dock tile you came from, the last focused app is remembered, and installing or removing an app refreshes the tiles while Home is open.
## Restoring your TV
diff --git a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
index e91721b0d..71d25a397 100644
--- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
+++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java
@@ -287,6 +287,11 @@ public class MainActivity extends Activity implements AppAdapter.TileListener {
View.OnKeyListener pillKeys = (v, keyCode, event) -> {
if (event.getAction() != KeyEvent.ACTION_DOWN) return false;
if (keyCode == KeyEvent.KEYCODE_DPAD_UP) return true;
+ if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) {
+ // Back to the dock tile Up came from, not wherever the focus finder lands.
+ focusTile(lastFocused % COLUMNS);
+ return true;
+ }
if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT) {
// The left end is Inputs, or Wi-Fi on a box without inputs.
return v.getId() == R.id.btnInputs