fix: CSService trigger on Android 17 (ContextualSearchManager wrapper) - #184
Open
FreeTeaspoon wants to merge 1 commit into
Open
fix: CSService trigger on Android 17 (ContextualSearchManager wrapper)#184FreeTeaspoon wants to merge 1 commit into
FreeTeaspoon wants to merge 1 commit into
Conversation
…id 17 Android 17 added a ContextualSearchConfig parameter to IContextualSearchManager.startContextualSearch and removed the single-argument form, so the direct Binder reflection call failed with NoSuchMethodException and Circle to Search never opened. Call the framework wrapper ContextualSearchManager.startContextualSearch(int) instead. It exists on Android 15, 16 and 17 and builds the Binder call with whatever arguments the installed platform expects.
PR Summary by QodoRestore CSService triggers on Android 17 via framework manager
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all |
FreeTeaspoon
force-pushed
the
fix/cs-service-android17
branch
from
September 6, 2026 10:13
dc63d86 to
7660d6d
Compare
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.
Problem
On Android 17 the CSService trigger fails with:
Android 17 added a
ContextualSearchConfigparameter toIContextualSearchManager.startContextualSearchand dropped the single-argument form, so the direct Binder reflection call inCSMSHookerno longer resolves and Circle to Search never opens from the tile or shortcut.Fix
Call the framework wrapper
android.app.contextualsearch.ContextualSearchManager.startContextualSearch(int)instead ofIContextualSearchManagerdirectly. The wrapper exists on Android 15, 16 and 17 and builds the Binder call with whatever arguments the installed platform expects, so there is no version branching in the module.Single-file change, 8 lines added, 6 removed.
Tested
MainActivitylaunch both openContextualSearchServiceEntrypoint→LensientActivitywith CSService selected.voice_interaction_servicedeliberately set to XiaoAI, which is the case where CSHelper fails: CSService now opens Circle to Search regardless of the active voice interaction service.MiCTSerrors in logcat.Relation to #183
#183 fixes the same
NoSuchMethodExceptionas part of a much larger HyperOS 4 change (native launcher hooks,HomeKeyRule,NativeLauncherTriggerHooker). This PR is only the minimal subset needed for the tile/shortcut path, so it can land independently while the rest of #183 is reviewed. It takes a slightly different route (the framework wrapper rather than the two-argument Binder method with a null config), but the two are not in conflict beyond a trivial rebase ofCSMSHooker.kt.