Commit Graph

12 Commits

Author SHA1 Message Date
Chun-Ku Lin
7e03bf65c7 Improve the speed of AccessibilitySettings#containsTargetNameInList to
help reduce the a11y settings' cold start latency.

Bug: 327052480
Flag: EXEMPT bugfix low risk
Test: atest com.android.settings.accessibility
Test: manual (a11y settings page still shows up with correct content)
Change-Id: Ib9980756d88a218ebb10f17d6a3b0d9a406a0ddd
2024-06-07 02:41:26 +00:00
Chun-Ku Lin
ba408fbb06 [Refactor] Create a dedicated AccessibilityServicePreference and
AccessibilityActivityPreference to encapture the method for loading the
content for AccessibilityService and AccessibilityShortcutInfo

Bug: 327052480
Test: atest com.android.settings.accessibility
Flag: EXEMPT mechanical refactor

Change-Id: I698a1d366e8ab82c8efdcae293a1ba1771925121
2024-06-04 00:22:44 +00:00
Pawan Wagh
6de4093876 Turn off voice access in 16KB mode
VoiceAccess doesn't support the 16KB mode yet. Skipping
voice accesss service when in page-agnostic mode.

Test: m Settings && adb install -r $ANDROID_PRODUCT_OUT/system_ext/priv-app/Settings/Settings.apk
Bug: 335443194
Bug: 340231742
Change-Id: If4deae48aaa221c843af5eb65208659ad38a08b2
2024-05-14 19:50:36 +00:00
Jay Thomas Sullivan
f8b405462a [ECM] Legacy code: treat DEFAULT as ALLOWED (st)
This modifies pre-flag behavior so that MODE_DEFAULT (of
OP_ACCESS_RESTRICTED_SETTINGS) is treated the
same as MODE_ALLOWED.

The reason is that we've change the default op mode (of
OP_ACCESS_RESTRICTED_SETTINGS) to MODE_DEFAULT. Since legacy code
doesn't understand what MODE_DEFAULT means, we need to mitigate the
impact of reverted flags.

Bug: 329488185
Test: atest SpaPrivilegedLibTests
Test: atest
com.android.settings.applications.specialaccess.notificationaccess
Test: atest com.android.settings.datausage
Test: atest PremiumSmsAccessTest
Test: atest RestrictedPreferenceHelperTest
Test: atest
CtsPermissionUiTestCases:android.permissionui.cts.EnhancedConfirmationManagerTest

Change-Id: I957c75870018a9d4d2d2e122ee3bb2252b338cb2
2024-03-21 20:24:29 -07:00
Hani Kazmi
206300962f Replace ECM AppOps call with service
A new ECM service was introcuded in changeId
I831391e4437b51b3312b5273a2360bd029a3d8ee.

We begin calling it, and update/cleanup method signatures to match.

Note: There are two feature flags:

1. enhancedConfirmationModeApisEnabled - read only, protects the
   mainline API.

2. extendEcmToAllSettings - runtime - gates calls to the above APIs.

We use both so we can ramp up in teamfood as needed.

Bug: 297372999
Test: Tested on device
Test: atest SpaPrivilegedLibTests
Test: atest com.android.settings.applications.specialaccess.notificationaccess
Test: atest com.android.settings.datausage
Test: atest PremiumSmsAccessTest
Test: atest RestrictedPreferenceHelperTest
Change-Id: I945ec51df5cd63de548a8ffdd1acc4f09f2301e5
2024-02-21 14:43:02 +00:00
Hani Kazmi
ded1cd59c9 Update existing ECM settings to use new infrastructure
1. Update Notification Listener and A11y settings to call
   RestrictedLockUtilsInternal rather than checking appOp themselves

2. Rename ecm related methods to include Ecm rather than AppOp -
   implementation details are being moved to permissions module and may
   change.

Bug: 297372999
Test: Manually tested on device. Automaated tests to follow
Change-Id: Ie3e16b502993b21a7e34eab0d661f98814b3cfd5
2023-12-07 15:59:52 +00:00
Chun-Ku Lin
b65108ba1b Split the string resource id for non-generic accessibility preference.
- Keep the accessibility settings strings the same as in U.

Bug: 289425138
Test: manual
Test: atest
Change-Id: Iddbbfe627c93529d2421e153094a30628229c4bc
2023-08-08 19:17:54 +00:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Chun-Ku Lin
b8084ecfcd Unified service and shortcut state summary on a11y settings page.
Bug: 210026562
Test: manual
Test: atest

Change-Id: I4d5ff6b10d6bfd2fe6b3de1849d00a9d084bf269
2023-05-23 22:19:55 +00:00
menghanli
f76e31fe48 Fix unbundled accessibility features settings crash when launched
Root cause: The ag/19938064 introduces Settings Core change preference value changed metrics log format. It tries to lookupMetricsCategory() at Fragment#instantiate() stage. It has not onAttach() to activity by FragmentManager#add() or #replace(). The features were added by ag/15824482.
Solution: PutInt new MATRICS_CATEGORY extra in previous class to avoid giving context for FeatureFactory.getFactory to custom 1P accessibility services for SettingsGoogle overlay.

Bug: 259355675
Test: manual test
Change-Id: Ic37d41be6a54fe388f211c1c397d0b9b87b5fb56
2022-11-18 22:18:27 +00:00
Ricky Wai
0cacded5ca Apply enhanced confirmation mode OEM config to Settings
So Settings app will block user accessing restricted settings
if OEM config is off.

Bug: 217709978
Test: With OEM config on, accessibility page for unknown source app is
disabled by default.
Test: With OEM config off, accessibility page for unknown source app is
not disabled.

Change-Id: Id25e8fd76e6192fd4db64f81903449bb02785b39
2022-04-08 13:57:02 +00:00
jasonwshsu
f02c069f3d Extract inner helper from AccessibilitySettings to public
* Need to be used in 'Connected device' page for hearing aid device

Bug: 225117933
Bug: 227172850
Test: make RunSettingsRoboTests ROBOTEST_FILTER=RestrictedPreferenceHelperTest
Change-Id: Icda456aa9c7597dc113775d1359acb0a8430768c
2022-03-31 21:49:13 +08:00