diff options
author | Tobias Haamel <haamel@google.com> | 2010-02-16 08:36:54 -0800 |
---|---|---|
committer | Tobias Haamel <haamel@google.com> | 2010-02-17 13:05:36 -0800 |
commit | 1e84ac51221037b1446baad30e1aae8823e5f5a6 (patch) | |
tree | 938de341894bc546e6a06e1596837265809a9208 /services | |
parent | fed93779a3e144eaa44012b802feb20d194b3a97 (diff) | |
download | frameworks_base-1e84ac51221037b1446baad30e1aae8823e5f5a6.zip frameworks_base-1e84ac51221037b1446baad30e1aae8823e5f5a6.tar.gz frameworks_base-1e84ac51221037b1446baad30e1aae8823e5f5a6.tar.bz2 |
Fix permission exception thrown on exit car mode.
Changing the status bar behavior requires special permission.
Since disableCarMode is called out of a context that might not have this
permission, the calling identity is cleared before changing the status
bar behavior.
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/DockObserver.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/java/com/android/server/DockObserver.java b/services/java/com/android/server/DockObserver.java index f0bab81..b566fb7 100644 --- a/services/java/com/android/server/DockObserver.java +++ b/services/java/com/android/server/DockObserver.java @@ -486,9 +486,11 @@ class DockObserver extends UEventObserver { // the status bar should be totally disabled, the calls below will // have no effect until the device is unlocked. if (mStatusBarManager != null) { - mStatusBarManager.disable(enabled + long ident = Binder.clearCallingIdentity(); + mStatusBarManager.disable(enabled ? StatusBarManager.DISABLE_NOTIFICATION_TICKER : StatusBarManager.DISABLE_NONE); + Binder.restoreCallingIdentity(ident); } } |