OSDN Git Service

Use effectiveUid instead of callingUid to set lockTaskMode
authorWale Ogunwale <ogunwale@google.com>
Mon, 12 Oct 2015 17:34:14 +0000 (10:34 -0700)
committerWale Ogunwale <ogunwale@google.com>
Mon, 12 Oct 2015 17:40:56 +0000 (17:40 +0000)
The callingUid can be different from that of the app been locked
(e.g. was launched from launcher) there by leading to the app crashing
when it tries to exit lockTaskMode.

Bug: 24146132
Change-Id: I03346fabd1d7e61b29178220c72f747a0600f5ec

services/core/java/com/android/server/am/ActivityStackSupervisor.java

index 6d91309..bf63931 100644 (file)
@@ -3920,7 +3920,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
         mLockTaskModeTasks.add(task);
 
         if (task.mLockTaskUid == -1) {
-            task.mLockTaskUid = task.mCallingUid;
+            task.mLockTaskUid = task.effectiveUid;
         }
 
         if (andResume) {