Loading core/res/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -3933,6 +3933,6 @@ <!-- Text spoken when the user stops preforming a gesture that would enable accessibility. [CHAR LIMIT=none] --> <string name="enable_accessibility_canceled">Accessibility canceled.</string> <!-- Text spoken when the current user is switched if accessibility is enabled. [CHAR LIMIT=none] --> <string name="user_switched">Switched to user <xliff:g id="name" example="Bob">%1$s</xliff:g>.</string> <string name="user_switched">Current user <xliff:g id="name" example="Bob">%1$s</xliff:g>.</string> </resources> services/java/com/android/server/accessibility/AccessibilityManagerService.java +10 −4 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // TODO: This is arbitrary. When there is time implement this by watching // when that accessibility services are bound. private static final int WAIT_FOR_USER_STATE_FULLY_INITIALIZED_MILLIS = 5000; private static final int WAIT_FOR_USER_STATE_FULLY_INITIALIZED_MILLIS = 3000; private static final String FUNCTION_REGISTER_UI_TEST_AUTOMATION_SERVICE = "registerUiTestAutomationService"; Loading Loading @@ -659,6 +659,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { oldUserState.mUserId, 0).sendToTarget(); } // Announce user changes only if more that one exist. UserManager userManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); final boolean announceNewUser = userManager.getUsers().size() > 1; // The user changed. mCurrentUserId = userId; Loading @@ -666,11 +670,13 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { mMainHandler.obtainMessage(MainHandler.MSG_SEND_RECREATE_INTERNAL_STATE, mCurrentUserId, 0).sendToTarget(); if (announceNewUser) { // Schedule announcement of the current user if needed. mMainHandler.sendEmptyMessageDelayed(MainHandler.MSG_ANNOUNCE_NEW_USER_IF_NEEDED, WAIT_FOR_USER_STATE_FULLY_INITIALIZED_MILLIS); } } } private void removeUser(int userId) { synchronized (mLock) { Loading Loading
core/res/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -3933,6 +3933,6 @@ <!-- Text spoken when the user stops preforming a gesture that would enable accessibility. [CHAR LIMIT=none] --> <string name="enable_accessibility_canceled">Accessibility canceled.</string> <!-- Text spoken when the current user is switched if accessibility is enabled. [CHAR LIMIT=none] --> <string name="user_switched">Switched to user <xliff:g id="name" example="Bob">%1$s</xliff:g>.</string> <string name="user_switched">Current user <xliff:g id="name" example="Bob">%1$s</xliff:g>.</string> </resources>
services/java/com/android/server/accessibility/AccessibilityManagerService.java +10 −4 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { // TODO: This is arbitrary. When there is time implement this by watching // when that accessibility services are bound. private static final int WAIT_FOR_USER_STATE_FULLY_INITIALIZED_MILLIS = 5000; private static final int WAIT_FOR_USER_STATE_FULLY_INITIALIZED_MILLIS = 3000; private static final String FUNCTION_REGISTER_UI_TEST_AUTOMATION_SERVICE = "registerUiTestAutomationService"; Loading Loading @@ -659,6 +659,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { oldUserState.mUserId, 0).sendToTarget(); } // Announce user changes only if more that one exist. UserManager userManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); final boolean announceNewUser = userManager.getUsers().size() > 1; // The user changed. mCurrentUserId = userId; Loading @@ -666,11 +670,13 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { mMainHandler.obtainMessage(MainHandler.MSG_SEND_RECREATE_INTERNAL_STATE, mCurrentUserId, 0).sendToTarget(); if (announceNewUser) { // Schedule announcement of the current user if needed. mMainHandler.sendEmptyMessageDelayed(MainHandler.MSG_ANNOUNCE_NEW_USER_IF_NEEDED, WAIT_FOR_USER_STATE_FULLY_INITIALIZED_MILLIS); } } } private void removeUser(int userId) { synchronized (mLock) { Loading