From 5a041e439ef63fda8fa682d2e834fd13acd412ad Mon Sep 17 00:00:00 2001 From: Daniel Norman Date: Mon, 26 Sep 2022 10:27:34 -0700 Subject: [PATCH] Stops updating A11yUserState on ACTION_USER_PRESENT. This was useful when the A11yUserState was temporarily modified while the keyguard was on. However, ever since the a11y gesture from commit 106fe732050f3d75a08c3bc48fdbcf84cac20b41 the A11yUserState is no longer temporarily modified this way. Bug: 247045101 Test: a11y presubmit tests Change-Id: I6fde21fe84cea3cae5f0dfa86fcd811a22542cc5 --- .../accessibility/AccessibilityManagerService.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java index 9a1d29554ad6b..8044af5dcb581 100644 --- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -728,7 +728,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub intentFilter.addAction(Intent.ACTION_USER_SWITCHED); intentFilter.addAction(Intent.ACTION_USER_UNLOCKED); intentFilter.addAction(Intent.ACTION_USER_REMOVED); - intentFilter.addAction(Intent.ACTION_USER_PRESENT); intentFilter.addAction(Intent.ACTION_SETTING_RESTORED); mContext.registerReceiverAsUser(new BroadcastReceiver() { @@ -746,14 +745,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub unlockUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0)); } else if (Intent.ACTION_USER_REMOVED.equals(action)) { 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)) { final String which = intent.getStringExtra(Intent.EXTRA_SETTING_NAME); if (Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES.equals(which)) {