Instead of unnecessarily creating them by hand. This also allows restricting the visibility of the ZenMode constructors (which should only be instantiated by ZenModesBackend in production code).
Bug: 360817586
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: Id5a232a5a0ffc7bc09652fc4b6e6dd2a6383a2ae
Adding methods to enable the Touchpad Visualizer option based on both the feature flag and the value of the settings toggle.
Test: atest TouchpadVisualizerPreferenceControllerTest
Test: Enable the flag and enable the "Show touchpad input" in developer
options and trace the logs in TouchpadInputMapper.
Bug: 359801523
Flag: com.android.hardware.input.touchpad_visualizer
Change-Id: I1c51bc617e907081043cea3e6bab1c719f4d2df9
Instead of "Limit what can notify you", title is now "Allow all notifications" and its behavior is reversed (switch ON hides people/apps/other).
Fixes: 360359116
Test: atest InterruptionFilterPreferenceControllerTest + manual
Flag: android.app.modes_ui
Change-Id: Ibb5334889662ec3aa778cd74c51506718ab0ebc7
* Sometimes would cause an unending stream of accessibility events (particularly if starting off-screen). This would break TalkBack and anything that depends on UiAutomator (although the system itself took it like a champ).
* Sometimes would not load images (because the ViewTreeObserver would never fire onGlobalLayout after being added because measured width was 0, even though a new width was calculated later).
* Would not recalculate the number of icons that fit if the width changes after the first layout.
Combining ViewHolders with waiting for measuring and/or ViewTreeObservers was always a wonky approach, even though it should've worked in theory. This should be more robust.
Also fixes the unwanted animation on mode screen load related to the absence of the header name being applied a tad too late.
Fixes: 359948417
Fixes: 360072876
Fixes: 360328804
Test: atest SettingsRoboTests + manual + adb shell uiautomator events
Flag: android.app.modes_ui
Change-Id: I7e5dfbdab220d1ebc1c68e5e87ce544ee86b6a65
The default value for display in the radio buttons were hard-coded and was not
being reflected to the slider correctly.
Bug: 359379399
Test: locally tested + unit tests added
Flag: com.android.server.accessibility.enable_color_correction_saturation
Change-Id: I95bd0ae1d32561dbbf6b4e87efe70595c9566de8
Switching from Priority Apps to None would still show the icons of the priority apps. There were several minor things wrong:
* We were keeping the AppSession when a mode switches from "priority apps" to "none", and because onResume always fires the callback, we were loading the icons.
* Even when deactivating the session, its own onResume lifecycle listener was still firing one extra time, before we had a chance to deactivate it.
Also two minor improvements to CircularIconsPreference:
* Update mLoadedIcons when we early exit due to mIconSet having no items. Mostly for testing, since the icons wouldn't be visible anyway.
* Use notifyChanged() when we get a measured view, instead of holding a reference to the view. Technically the previous code violated the "shouldn't keep references to views outside of onBindViewHolder" (although I didn't see this having an effect in practice).
Fixes: 360077747
Test: atest ZenModeAppsLinkPreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: I6d4b7a344542da46f5ebfcd0774f1af27ed113ac
Bug: 353700779
Test: atest AccessibilitySettings, ensure new test passes
Test: revert AccessibilitySettings.java change, ensure new test fails
Test: Install poc APKs from the bug, observe issue not reproducible
Flag: NONE security fix
Change-Id: Ie680e80169aa734f2559fe50ef06e4d1eae46779
Assigns metrics categories to all modes pages under
ZenModesListFragment. Includes new metrics categories where appropriate.
Bug: 332937635
Test: Build and flash
Flag: android.app.modes_ui
Change-Id: Ic19862ec194b40eae294d3c30240fe3f51304665
Before multiple admins were introduced, only main user could be an admin and that status was not modifiable. But now it can be updated for non-main admins of the device. So it is important to refresh this value to keep it up to date.
Bug: 359466920
Test: atest UserCapabilitiesTest
Flag: EXEMPT bugfix_only
Change-Id: If39ad24b10daf6886f402926b3bab23b50201c98
In controller test, simulating profile with hideIndQuietMode set to true
in by mocking AppEntry is not possible. updateAppList() method is
assumed to already receive a filtered list of apps based on the
profile's quiet mode status which is called from onRebuildComplete().
Corresponding filters for this page has test in the underlying settingsLib ApplicationsStateTest file
Bug: 26013153
Test: Manual
Flag: EXEMPT only test file
Change-Id: I09ea3b279c40e0ee4806a80646a5dfcd3d3f784b
This change removes the custom rounding of corners, as the provided images already have rounded corners.
Bug: 332730534
Test: manual (light & dark mode, various font/display sizes)
Flag: android.app.modes_ui
Change-Id: I71d0707554e5bc638add6a2907874e18e833da08
1. For biometric settings, request biometric prompt only after
successful credential verification and no auth request after
enrollment
2. Differentiate between mandatory biometrics ineffective error and
other biometric errors
Flag: android.hardware.biometrics.flags.mandatory_biometrics
Bug: 358176202
Bug: 358179610
Test: atest UtilsTest DevelopmentSettingsDashboardFragmentTest MainClearTest BuildNumberPreferenceControllerTest CombinedBiometricProfileSettingsTest
Change-Id: I778dd5403dd5ab64d8cc39bd88b22c4d39182e94
Bug: 356273849
Test: mp droid and locally checked that there are no errors and crashes
Flag: EXEMPT minor fix
Change-Id: Id60b304788bfb79fee13858c8e7bc30261f8e1c7