diff options
author | Daniel Sandler <dsandler@android.com> | 2013-02-20 13:39:12 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-02-20 13:39:12 -0800 |
commit | 569e44a73bd4436998cf3e7875629bfbecffcbe9 (patch) | |
tree | 0b2470cd267c6f87bec4c82348b571afbda658e0 /services | |
parent | 81ba14444fe9e6196f11a8f124a5b677fed4cb46 (diff) | |
parent | fd171e43e4946ce5789e5dd8ade09a1cbf2a5ae0 (diff) | |
download | frameworks_base-569e44a73bd4436998cf3e7875629bfbecffcbe9.zip frameworks_base-569e44a73bd4436998cf3e7875629bfbecffcbe9.tar.gz frameworks_base-569e44a73bd4436998cf3e7875629bfbecffcbe9.tar.bz2 |
am fd171e43: Merge "Switch to system process before modifying rotation."
* commit 'fd171e43e4946ce5789e5dd8ade09a1cbf2a5ae0':
Switch to system process before modifying rotation.
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/wm/WindowManagerService.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 8cbacdc..b193430 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -5312,8 +5312,14 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_ORIENTATION) Slog.v(TAG, "freezeRotation: mRotation=" + mRotation); - mPolicy.setUserRotationMode(WindowManagerPolicy.USER_ROTATION_LOCKED, - rotation == -1 ? mRotation : rotation); + long origId = Binder.clearCallingIdentity(); + try { + mPolicy.setUserRotationMode(WindowManagerPolicy.USER_ROTATION_LOCKED, + rotation == -1 ? mRotation : rotation); + } finally { + Binder.restoreCallingIdentity(origId); + } + updateRotationUnchecked(false, false); } @@ -5330,7 +5336,14 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_ORIENTATION) Slog.v(TAG, "thawRotation: mRotation=" + mRotation); - mPolicy.setUserRotationMode(WindowManagerPolicy.USER_ROTATION_FREE, 777); // rot not used + long origId = Binder.clearCallingIdentity(); + try { + mPolicy.setUserRotationMode(WindowManagerPolicy.USER_ROTATION_FREE, + 777); // rot not used + } finally { + Binder.restoreCallingIdentity(origId); + } + updateRotationUnchecked(false, false); } |