feat(android): warn user when third-party accessibility service active before seed phrase reveal#20971
feat(android): warn user when third-party accessibility service active before seed phrase reveal#20971xAlisher wants to merge 1 commit into
Conversation
…seed phrase reveal Closes #20965 Before revealing the recovery phrase, check whether any third-party accessibility service is active. If so, show an informed-consent dialog listing the service names, with a link to Android Accessibility Settings and a "Reveal anyway" / "Cancel" choice. Implementation: - AccessibilityServiceHelper.java: queries AccessibilityManager for enabled services, filters out system/OEM packages (com.android.*, com.google.*, com.samsung.*, com.sec.*) and the app itself. - StatusQtActivity.java: adds getThirdPartyA11yServices() instance method (JNI bridge) and openAccessibilitySettings() static method. - systemutilsinternal.cpp/h: exposes both methods as Q_INVOKABLE via QJniObject — uses QtNative.activity() + callObjectMethod pattern to avoid Qt 6.11 varargs issue with callStaticObjectMethod returning jobject. - AccessibilityWarningPopup.qml: new StatusDialog with bulleted service list and a deep-link to Settings > Accessibility. - BackupSeedphraseReveal.qml, SeedPhrase.qml: reveal button onClicked gates on activeThirdPartyA11yServices(); opens popup when non-empty, reveals directly otherwise. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Jenkins BuildsClick to see older builds (11)
|
|
@xAlisher some screenshot or video of the PR in action would be nice :) |
|
@caybro here it is |
alexjba
left a comment
There was a problem hiding this comment.
Awesome!
Just some suggestions/questions.
Didn't test it though. I can give it a spin tomorrow
| * Returns a comma-separated list of active third-party accessibility service names, | ||
| * or an empty string if none are found. | ||
| * | ||
| * Filters out known system/OEM packages (com.android.*, com.samsung.*, com.sec.*, |
There was a problem hiding this comment.
Hmm, why skipping these? I imagine this list is incomplete. If we need to skip Samsung packages, it would probably make sense to include all the other big OEM flavors.
Would it hurt not to skip any of these apps?
There was a problem hiding this comment.
Thanks for highlighting it! Yep, it's easy to prepare this list.
But it's more of a strategic than functional decision. Personally I'd be in favour of notifying about all accessibility apps and letting the user decide if they're OK to let Samsung's or whatever Xiaomi's apps access their recovery phrase. From a purist privacy-maxi standpoint this is the only way forward.
Curious what @sunleos thinks — would you be OK with listing all of them and letting the user decide?
| @@ -0,0 +1,49 @@ | |||
| package app.status.mobile; | |||
There was a problem hiding this comment.
I'd place all this in the MobileUI repo. It would be exposed to QML directly by MobileUI package. It would mostly mean to move the code there.
There was a problem hiding this comment.
Not sure... we need to call it from our C++ internal utils, not directly from QML
| String r = String.join(", ", names); | ||
| return r; |
There was a problem hiding this comment.
| String r = String.join(", ", names); | |
| return r; | |
| return String.join(",", names); |
would work better I guess, ie w/o the space in between
| @@ -0,0 +1,49 @@ | |||
| package app.status.mobile; | |||
There was a problem hiding this comment.
Not sure... we need to call it from our C++ internal utils, not directly from QML
| @@ -0,0 +1,49 @@ | |||
| package app.status.mobile; | |||
Closes #20965
What this does
Before revealing the recovery phrase, check whether any third-party accessibility service is active on the device. If so, show an informed-consent dialog that:
If no third-party services are active, reveal proceeds without interruption.
This applies to both the Settings → Back up recovery phrase flow (
BackupSeedphraseReveal.qml) and the onboarding seed phrase display flow (SeedPhrase.qml).Implementation
Java (Android)
AccessibilityServiceHelper.java— new class; queriesAccessibilityManagerfor enabled services, filters out system/OEM packages (com.android.*,com.google.*,com.samsung.*,com.sec.*) and the app's own package.StatusQtActivity.java— addsgetThirdPartyA11yServices()instance method andopenAccessibilitySettings()static method, both callable from C++ via JNI.C++ (StatusQ)
systemutilsinternal.h/cpp— exposesactiveThirdPartyA11yServices()andopenAccessibilitySettings()asQ_INVOKABLEthroughSystemUtilssingleton. UsesQtNative.activity()+callObjectMethodpattern (required for Qt 6.11 —callStaticObjectMethodreturningjobjectwith no arguments has a known varargs issue).QML
AccessibilityWarningPopup.qml— newStatusDialogusing existing design tokens; bulleted service list;Settings > Accessibilitydeep-link viaonLinkActivated.BackupSeedphraseReveal.qml,SeedPhrase.qml— reveal buttononClickedgates onSystemUtils.activeThirdPartyA11yServices(); opens popup if non-empty, reveals directly otherwise.Test steps
Screenshots
Related