Repository navigation
Conversation
|
maintainer-bot review · this one needs a maintainer decision Thanks for the PR! Couldn't review this one automatically; it goes to the maintainer. Checks
Reviewed by maintainer-bot · runs on 0G Private Computer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HomeKeyServiceswaps a tap's target for itsfront:entry while the button's own app is already in front, butInputKeyServiceread only the plain entry. With both helpers bound, both callRemoteKeys.handlefor the same press and the first copy decides, so whenInputKeyServicesaw the release first the plain target opened and thefront:alternative was lost. The selection now lives inRemoteKeys.tap(), with the package in front kept inRemoteKeys.frontPackage(still set only byHomeKeyService's window events, cleared when it goes away), and both helpers use it. With onlyInputKeyServicebound nothing is in front and it opens the plain entry, as before; setups withoutfront:entries are unchanged.docs/launcher.mdnow saysfront:entries needHomeKeyServicebound andInputKeyServicefollows it then (withINPUT_KEY_SERVICE=1alone nothing is in front). Found by reading the code, then reproduced on a TV (below).Tested on: TCL Q6 (G10), Google TV 14, build UTT2.250416.001
On the TV,
HomeKeyServiceandInputKeyServiceboth on,app_keys: ["29:<YouTube>", "front:29:com.android.tv.settings"], the key pressed through a USB keyboard (so it reaches the helpers the way a remote button does;input keyeventdoes not reach them on this set): press once from Home (YouTube opens), then again with YouTube in front, three runs per APK. main: the second press opened Settings in 2 of 3 runs and YouTube again in 1 (thefront:entry lost toInputKeyService). This branch: Settings in 3 of 3.gradlew --no-daemon testReleaseUnitTest lintRelease assembleRelease: BUILD SUCCESSFUL, unit tests pass (RemoteKeysTest30/30), lint 0 errors (98 warnings, as on main), release APK 587,353 B (main: 587,321 B, +32 B; gate 589,824 B).RemoteKeysTest.tapPicksTheFrontEntryOnlyWhileTheButtonsAppIsInFrontcovers the shared selection. It does not compile on main (noRemoteKeys.tap), so it is red there, and withtap()changed to always return the plain target it fails (mutation check); it cannot drive the services'onKeyEvent, which needs a realKeyEvent.test_sony_settings_key_note,test_key_filter,test_app_keys_action_words,test_home_long_press_homeand others): OK.Overlaps #3600 next to
HomeKeyService.onKeyEvent'sapp_keyslookup (different lines in the same block); whichever merges second needs a small rebase, which I will push.If this touches the launcher
values/strings.xmland the othervalues-*folders (n/a, no strings)config.xmlor a theme, not in codeReviewed with cross-review 1.2.1 (SkillArray, MIT license): https://github.com/M-khalifa/SkillArray