Switch display uid whitelist from task to activity
Tasks can contain activities from multiple UIDs, so the uid whitelists
for private displays need to be based on activities instead of tasks.
This change also stops keeping track of uids on public displays, since
the uid list is not used for those displays.
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testPermissionLaunchMultiUidTask
Change-Id: I38f1434f581af64f0db40221431994fd5a99bab3
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index 99fe418..1db6202 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -1236,6 +1236,10 @@
mWindowContainerController.positionChildAt(appController, index);
}
r.onOverrideConfigurationSent();
+
+ // Make sure the list of display UID whitelists is updated
+ // now that this record is in a new task.
+ mService.mStackSupervisor.updateUIDsPresentOnDisplay();
}
/**