AccessibilityShortcutsTutorial.
**Root cause**
When toggle the shortcut, it asks the AccessibilityManager to turn on
the shortcut and update the Settings data. Internally, the
AccessibilityManager delegate the work to AccessibilityManagerService
via a oneway binder call.
In the past, when launching the AccessibilityShortcutsTutorial, we
assume the shortcut selection are saved in the Settings before launching
the AccessibilityShortcutsTutorial. So we pass whatever are in the
Settings as what the user has selected to the tutorial.
This is not true anymore since we use the oneway AIDL call to do the
updates. The data in Settings may not yet be updated before we use it to
launch the tutorial.
Since the user preferred shortcuts are always set before we attempt to
launch the AccessibilityShortcutsTutorial, we can rely on it instead of
the Settings value to launch the AccessibilityShortcutsTutorial for the
selected shortcut options.
**Changes in this cl**
- Mechanical refactor to extract the lines to get the user preferred
shortcut into a method.
- Use the new method to grab the shortcut options to pass to the
AccessibilityShortcutsTutorial to prevent the crash.
Bug: 341176890
Test: manual
- Modify the AccessibilityManagerService locally to delay processing
the request to update the shortcut options in Settings data
- Turn on the shortcut toggle, and verify the app won't crash
Test: atest com.android.settings.accessibility
Flag: EXEMPT bugfix (low risk + mechanical refactor)
Change-Id: Id3cc4cc5f6667061545955881632544472aedd95
The bug-fix flag is already soaking in trunkfood full stage for a while.
Since there is no coming issues related to the fix, we can apply the fix
and remove the flag usage.
Bug: 341203230
Flag: NONE
Test: manually
atest MagnificationAlwaysOnPreferenceControllerTest
Change-Id: I7e6ef8e03e7b7291d2faa15351669a91a50f59a5
The onReceiveSimCardStateChangeReceiver_receiveAction_timerCountDown
is failed since the action is wrong.
Bug: 337417975
Test: atest UiccSlotUtilTest (pass)
Change-Id: I0cb12432553155d69f985693e4ef911455c81652
When app ops permission's app ops mode is default, should check if
permission is grant.
Fix: 339846642
Test: manual - on AlarmsAndRemindersAppList
Test: unit test
Change-Id: Ia0f05211f5774637304502ead79dd98a1cf89886
Although we haven't implemented joystick feature, but the joystick
preference controller is already in the codebase, so we also add hiding
logic for joystick toggle when in setup wizard.
Bug: 340721852
Flag: NONE
Test: manually
atest MagnificationJoystickPreferenceControllerTest
Change-Id: Ife93548583c3e82eac030e6e3aa55b9f643b055a
Originally we cache mFollowingTypingSwitchPreference in fragment so in
ToggleScreenMagnificationPreferenceFragmentForSetupWizard we can set the
preference visible to false to hide it. After creating MagnificationFeaturePreferenceController,
the MagnificationFollowTypingPreferenceController can extend it and
check isInSetupWizard internally then dicide whether to hide. Therefore,
we don't need to cache mFollowingTypingSwitchPreference in fragment
and let the fragment control the preference visibility anymore.
Bug: 340721852
Flag: NONE
Test: manually
atest MagnificationFollowTypingPreferenceControllerTest
atest ToggleScreenMagnificationPreferenceFragmentForSetupWizardTest
atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I44f7f0589b2df3d83a27139323fc68a0561f1cfa
Add a new abstract class MagnificationFeaturePreferenceController
that extends TogglePreferenceController, to wrap inSetupWizard
setter/getter. Then for magnification feature preference controllers
like alwaysOn or followTyping, they can just check isInSetupWizard to
decide whether hiding in setup wizard.
Besides, in ToggleScreenMagnificationPreferenceFragment we cache a flag
mInSetupWizard when fragment created, so we can pass the info to the
preferece controllers when creating them.
Bug: 340721852
Flag: NONE
Test: build pass
Change-Id: I05c59a766219862117d2a6ede775d68a4c3dedac
Adding minor touch ups, such as starting the
FingerprintEnrollConfirmation when enrollment has been completed.
Bug: 297082837
Test: atest
Change-Id: I7b3edebb141bdb3e4648f71527d45dc5a0185b60