Skip to content

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

Merge PR #1294: Hisense SmartTV 4K FFM (songshan): notes from a second unit

Gathin230cf556cefc6e
diff --cc docs/devices/tcl-55p71b-g09-key-repeat.md
index b2f136350,e9b4aa06f..184b644c0
--- a/docs/devices/tcl-55p71b-g09-key-repeat.md
+++ b/docs/devices/tcl-55p71b-g09-key-repeat.md
@@@ -102,50 -102,15 +102,59 @@@ question from the window policy on Andr
reporter's own suggestion - a helper that synthesizes the repeat with `adjustSuggestedStreamVolume` while
a volume key is held - is launcher code, and an off-by-default switch at best; it is not in this note.
-## A Hisense set too
+## Where the repeat goes on a Hisense set with a CEC soundbar
+
+A third set, with a log of the held key: Hisense 75U75N (`hengshan`, MediaTek), Google TV / Android 12,
+firmware `STT2.230310.002`, US market, one unit, one evening. Sound goes over HDMI eARC to a soundbar with
+HDMI-CEC system audio on, so each volume step leaves the TV as a CEC `<User Control Pressed>` volume key.
+
+| `enabled_accessibility_services` | holding volume up |
+| --- | --- |
+| `HomeKeyService` alone (`capabilities=8` in `dumpsys accessibility`) | one step per press |
+| `""`, with `accessibility_enabled 0` | ramps continuously |
+
+`InputKeyService` was not tried on this set. With the helper bound, `logcat` for one press held for 2.7 s:
+
+- `InputDispatcher: notifyKey` shows the down and, 2.7 s later, the up, and nothing between. The remote sends
+ no repeats of its own; the dispatcher makes them while a key it has dispatched stays down.
+- `WindowManager: interceptKeyTi keyCode=24 down=true` comes twice, the first time with
+ `interceptDelayTime=144`, the second 145 ms later.
+- `HdmiCecLocalDeviceTv` then sends one volume step, and the CEC history in `dumpsys hdmi_control` holds one
+ `<User Control Pressed> 05:44:41` and its release for the whole hold.
+
+That pattern fits Android 12's accessibility key filter: with a service asking to filter keys, volume keys
+go to the window policy's `interceptKeyBeforeDispatching` before any service sees them, and the second call is
+that check retried after the delay it asked for. On this firmware the policy answers by sending the CEC
+step itself and reporting the key consumed, so the event ends inside the filter. No service receives it, and
+the dispatcher never gets the held key it would make repeats from. A test build whose helper stepped the
+volume itself while a volume key was held sent no second CEC step, so on this set the helper never saw the
+key either. That is a log of the framework's side, read against the AOSP filter; it still has no
+`onKeyEvent` line from a helper, which is what the "launcher is not the one eating the repeats" section asks
+for.
+
+What the helpers would buy on this set, from `dumpsys window policy` and `logcat`:
+
+| Button | What arrives | Without a helper |
+| --- | --- | --- |
+| Gear | `KEYCODE_NOTIFICATION` 83, scancode 598 | a global key for launcherx's `GlobalKeyListener_Receiver`, so nothing once it is disabled |
+| YouTube | `KEYCODE_BUTTON_3` 190 | the same global key route |
+| Prime Video, Disney+, Tubi | 295, 607, 606 | the policy consumes them and Hisense's `com.vt.tv.smartsense` asks launcherx to open the app with `com.google.global_button.ACTION_LAUNCH_APP`, addressed to launcherx; another app registered for that action received nothing |
+| Netflix, Input | | work, through Hisense and MediaTek receivers that stay enabled |
+
+Keeping launcherx enabled while another launcher holds Home did not work here: re-enabled, it took Home back
+(`cmd package resolve-activity` named it although `android.app.role.HOME` was given to the new launcher), and
+the shell may not disable its home activity alone (`SecurityException` from `pm disable-user` on the
+component). The owner kept the ramp and dropped the five buttons.
+
++## A second Hisense set, without a soundbar
+
+ A Hisense SmartTV 4K FFM (`songshan`, MediaTek, Android 11, `RTT2.220118.001`, the second unit in
+ [`examples/hisense-smarttv-4k-ffm-android11`](../../examples/hisense-smarttv-4k-ffm-android11/debloat.txt))
+ does the same with `InputKeyService` alone bound: held volume up arrives as one press, and the firmware's
+ own key log (`WindowManager: interceptKeyTi keyCode=24 down=true repeatCount=0`) shows no repeat after
+ it. The empty-list control was not run there either. The owner kept the helper for the YouTube, Prime
+ Video, Disney+, Peacock and gear buttons and lives with one step per press.
+
## Choices
- **Keep the repeat and skip the helpers.** Do not pass `INPUT_KEY_SERVICE=1` or `HOME_KEY_SERVICE=1`