Merge "Merge "Stops updating A11yUserState on ACTION_USER_PRESENT." am: f38f9ca575 am: 7ba78da385 am: 10e870c773" into tm-d1-dev-plus-aosp

This commit is contained in:
Automerger Merge Worker
2022-09-28 18:03:25 +00:00
committed by Android (Google) Code Review

View File

@@ -728,7 +728,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
intentFilter.addAction(Intent.ACTION_USER_SWITCHED); intentFilter.addAction(Intent.ACTION_USER_SWITCHED);
intentFilter.addAction(Intent.ACTION_USER_UNLOCKED); intentFilter.addAction(Intent.ACTION_USER_UNLOCKED);
intentFilter.addAction(Intent.ACTION_USER_REMOVED); intentFilter.addAction(Intent.ACTION_USER_REMOVED);
intentFilter.addAction(Intent.ACTION_USER_PRESENT);
intentFilter.addAction(Intent.ACTION_SETTING_RESTORED); intentFilter.addAction(Intent.ACTION_SETTING_RESTORED);
mContext.registerReceiverAsUser(new BroadcastReceiver() { mContext.registerReceiverAsUser(new BroadcastReceiver() {
@@ -746,14 +745,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
unlockUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0)); unlockUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0));
} else if (Intent.ACTION_USER_REMOVED.equals(action)) { } else if (Intent.ACTION_USER_REMOVED.equals(action)) {
removeUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0)); removeUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0));
} else if (Intent.ACTION_USER_PRESENT.equals(action)) {
// We will update when the automation service dies.
synchronized (mLock) {
AccessibilityUserState userState = getCurrentUserStateLocked();
if (readConfigurationForUserStateLocked(userState)) {
onUserStateChangedLocked(userState);
}
}
} else if (Intent.ACTION_SETTING_RESTORED.equals(action)) { } else if (Intent.ACTION_SETTING_RESTORED.equals(action)) {
final String which = intent.getStringExtra(Intent.EXTRA_SETTING_NAME); final String which = intent.getStringExtra(Intent.EXTRA_SETTING_NAME);
if (Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES.equals(which)) { if (Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES.equals(which)) {