Clear ident in dismissKeyguardOnNextActivity().
BaseStatusBar uses this to launch activities over the insecure
lockscreen, so clear identity.
Bug: 6414983
Change-Id: Idf578923285ee1344e6e13e7f51e17a5f2005c75
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 429c3c4..cc96501 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -4107,12 +4107,17 @@
public void dismissKeyguardOnNextActivity() {
enforceNotIsolatedCaller("dismissKeyguardOnNextActivity");
- synchronized (this) {
- if (mLockScreenShown) {
- mLockScreenShown = false;
- comeOutOfSleepIfNeededLocked();
+ final long token = Binder.clearCallingIdentity();
+ try {
+ synchronized (this) {
+ if (mLockScreenShown) {
+ mLockScreenShown = false;
+ comeOutOfSleepIfNeededLocked();
+ }
+ mMainStack.dismissKeyguardOnNextActivityLocked();
}
- mMainStack.dismissKeyguardOnNextActivityLocked();
+ } finally {
+ Binder.restoreCallingIdentity(token);
}
}