Fix activity cannot goes to stop when keyguard shown.
1. Fix activity shows on non-default display cannot goes to STOPPED
successfully when keyguard shown. Previous when keyguard shows,
there is only one sleep token for default display, for those
activity runs on non-default display, they cannot go to STOPPED
because they cannot be removed from
StackSupervisor.mActivitiesWaitingForVisibleActivity, which cause
them be stuck at RESUMED state.
2. Providing a basic struct for KeyguardController to handle occludes
and dismiss keyguard for each display.
Bug: 112823693
Test: atest CtsActivityManagerDeviceTestCases
Change-Id: I9c2de47e65bbb7a193f0b00246f3c13db7f6b3b5
diff --git a/core/proto/android/server/activitymanagerservice.proto b/core/proto/android/server/activitymanagerservice.proto
index 9d5f0bc..ab50ad1 100644
--- a/core/proto/android/server/activitymanagerservice.proto
+++ b/core/proto/android/server/activitymanagerservice.proto
@@ -130,6 +130,13 @@
option (.android.msg_privacy).dest = DEST_AUTOMATIC;
optional bool keyguard_showing = 1;
+ repeated KeyguardOccludedProto keyguard_occluded_states= 2;
+}
+
+message KeyguardOccludedProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ optional int32 display_id = 1;
optional bool keyguard_occluded = 2;
}