From a048cb2e5a27c0c98d17c9d6254e8313ce20a242 Mon Sep 17 00:00:00 2001 From: sparsh0711 Date: Sun, 25 Oct 2026 15:56:52 +0000 Subject: [PATCH] Launcher: open the Inputs menu after Android 9's extra pause (#1688) On Android 9 a new intent delivered while Home is paused is wrapped in a brief resume and pause, and onPause() closed the Inputs menu that openInputsIfAsked() had just opened. Post the open, as the cold-start branch already does. Tried on a Hisense HiSmartTV A4, Android TV 9. Fixes #1688 --- .../src/main/java/com/gathin/tvhome/MainActivity.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 880d15fcc..07ece4da5 100644 --- a/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java +++ b/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java @@ -850,8 +850,13 @@ public class MainActivity extends Activity implements AppAdapter.TileListener { View anchor = topMenu ? findViewById(R.id.btnSettings) : btnInputs; if (anchor.getVisibility() != View.VISIBLE) return true; if (anchor.isLaidOut()) { - anchor.requestFocus(); - showInputs(); + // Android 9 delivers a new intent to a paused activity with a brief resume and pause around it, and + // onPause() closes popups, so open the menu once that has run (HiSmartTV A4, Android TV 9). + anchor.post(() -> { + if (isFinishing() || anchor.getVisibility() != View.VISIBLE) return; + anchor.requestFocus(); + showInputs(); + }); return true; } // Cold start: the popup anchors to the pill (or the gear), so wait for the first layout.