Support show KeyguardPresentation on all public displays.

Support show keyguard presentation on all public displays when Keyguard
is show.
Modify API ActivityTaskManager#setLockScreenShown, extends to multi-displayIds.

bug: 111955725
Test: Manual test with chromecast.
Test: atest SystemUITests
Test: atest ActivityManagerMultiDisplayTests
Test: atest ActivityManagerDisplayKeyguardTests
Change-Id: I9967e1b1adcb796593332b46853a10101e206013
This commit is contained in:
wilsonshih
2018-09-26 16:17:59 +08:00
parent 44f74d111f
commit e7903ea985
10 changed files with 221 additions and 138 deletions

View File

@@ -265,17 +265,6 @@ interface IActivityManager {
void getMyMemoryState(out ActivityManager.RunningAppProcessInfo outInfo);
boolean killProcessesBelowForeground(in String reason);
UserInfo getCurrentUser();
/**
* Informs ActivityManagerService that the keyguard is showing.
*
* @param showingKeyguard True if the keyguard is showing, false otherwise.
* @param showingAod True if AOD is showing, false otherwise.
* @param secondaryDisplayShowing The displayId of the secondary display on which the keyguard
* is showing, or INVALID_DISPLAY if there is no such display. Only meaningful if
* showing is true.
*/
void setLockScreenShown(boolean showingKeyguard, boolean showingAod,
int secondaryDisplayShowing);
// This is not public because you need to be very careful in how you
// manage your activity to make sure it is always the uid you expect.
int getLaunchedFromUid(in IBinder activityToken);

View File

@@ -245,16 +245,16 @@ interface IActivityTaskManager {
ActivityManager.StackInfo getStackInfo(int windowingMode, int activityType);
/**
* Informs ActivityManagerService that the keyguard is showing.
* Informs ActivityTaskManagerService that the keyguard is showing.
*
* @param showingKeyguard True if the keyguard is showing, false otherwise.
* @param showingAod True if AOD is showing, false otherwise.
* @param secondaryDisplayShowing The displayId of the secondary display on which the keyguard
* is showing, or INVALID_DISPLAY if there is no such display. Only meaningful if
* showing is true.
* @param secondaryDisplaysShowing The displayId's of the secondary displays on which the
* keyguard is showing, or {@code null} if there is no such display. Only meaningful if showing
* is {@code true}.
*/
void setLockScreenShown(boolean showingKeyguard, boolean showingAod,
int secondaryDisplayShowing);
in int[] secondaryDisplaysShowing);
Bundle getAssistContextExtras(int requestType);
boolean launchAssistIntent(in Intent intent, int requestType, in String hint, int userHandle,
in Bundle args);