diff options
author | Svetoslav <svetoslavganov@google.com> | 2013-06-25 17:02:01 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-06-25 17:02:01 -0700 |
commit | b10804a903d2fdb9beee818ea27b471d7a3b5019 (patch) | |
tree | 063bbd73c7f6410905296df16ee35d4c3a956f3b /services | |
parent | a5df9aa49704b58df6a327def6adbf661198d111 (diff) | |
parent | 0cb0a37f1c8463fa3ba535dc4969316f7c1cbf88 (diff) | |
download | frameworks_base-b10804a903d2fdb9beee818ea27b471d7a3b5019.zip frameworks_base-b10804a903d2fdb9beee818ea27b471d7a3b5019.tar.gz frameworks_base-b10804a903d2fdb9beee818ea27b471d7a3b5019.tar.bz2 |
am 0cb0a37f: am a0b9e1ee: am 99e4a0f5: Merge "Improper initialization of the accessibility manager service." into jb-mr2-dev
* commit '0cb0a37f1c8463fa3ba535dc4969316f7c1cbf88':
Improper initialization of the accessibility manager service.
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/accessibility/AccessibilityManagerService.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java index 0ab56df..fd6b467 100644 --- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -195,6 +195,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { private int mCurrentUserId = UserHandle.USER_OWNER; + //TODO: Remove this hack + private boolean mInitialized; + private UserState getCurrentUserStateLocked() { return getUserStateLocked(mCurrentUserId); } @@ -771,6 +774,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { private void switchUser(int userId) { synchronized (mLock) { + if (mCurrentUserId == userId && mInitialized) { + return; + } + // Disconnect from services for the old user. UserState oldUserState = getUserStateLocked(mCurrentUserId); oldUserState.onSwitchToAnotherUser(); @@ -1283,6 +1290,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { } private void onUserStateChangedLocked(UserState userState) { + // TODO: Remove this hack + mInitialized = true; updateLegacyCapabilities(userState); updateServicesLocked(userState); updateFilterKeyEventsLocked(userState); |