diff options
author | John Spurlock <jspurlock@google.com> | 2014-02-19 09:49:25 -0500 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-02-19 09:49:25 -0500 |
commit | 4355a533bc9349c84d9ec6d7d67c57b5ca060ecb (patch) | |
tree | cf070359b5b098f942009717866b2e88bf3d8a33 | |
parent | 807e0c180b1aaf519ea9ff788508219166cd00cd (diff) | |
download | frameworks_base-4355a533bc9349c84d9ec6d7d67c57b5ca060ecb.zip frameworks_base-4355a533bc9349c84d9ec6d7d67c57b5ca060ecb.tar.gz frameworks_base-4355a533bc9349c84d9ec6d7d67c57b5ca060ecb.tar.bz2 |
Don't call back into AM to get current user.
Bug:13079471
Change-Id: I733d6e3c41c91008406261eac827e6b65bb400db
-rw-r--r-- | policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java | 12 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 2 |
2 files changed, 3 insertions, 11 deletions
diff --git a/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java b/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java index 3cc74fc..5602206 100644 --- a/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java +++ b/policy/src/com/android/internal/policy/impl/ImmersiveModeConfirmation.java @@ -84,9 +84,9 @@ public class ImmersiveModeConfirmation { return exit != null ? exit.getDuration() : 0; } - public void loadSetting() { + public void loadSetting(int currentUserId) { mConfirmed = false; - mCurrentUserId = getCurrentUser(); + mCurrentUserId = currentUserId; if (DEBUG) Slog.d(TAG, String.format("loadSetting() mCurrentUserId=%d resetForPanic=%s", mCurrentUserId, mUserPanicResets.get(mCurrentUserId, false))); String value = null; @@ -159,14 +159,6 @@ public class ImmersiveModeConfirmation { saveSetting(); } - private int getCurrentUser() { - try { - return ActivityManagerNative.getDefault().getCurrentUser().id; - } catch (RemoteException e) { - throw new IllegalStateException(e); // local call - } - } - private void handleHide() { if (mClingWindow != null) { if (DEBUG) Slog.d(TAG, "Hiding immersive mode confirmation"); diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index ece4fe7..c0f8414 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -1168,7 +1168,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { updateRotation = true; } if (mImmersiveModeConfirmation != null) { - mImmersiveModeConfirmation.loadSetting(); + mImmersiveModeConfirmation.loadSetting(mCurrentUserId); } PolicyControl.reloadFromSetting(mContext); } |