Fix app over lockscreen being cropped by docked stack
When secure apps are launched over lockscreen, the bounds should always
be fullscreen. Also docked stack and divider shouldn't be visible while
lockscreen is shown.
bug: 25837786
Change-Id: I0bc681cdb46404fb79e9332d1f82fee51f338da9
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index cae8b8e..1f06b45 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -24,7 +24,7 @@
import static android.content.pm.ActivityInfo.FLAG_SHOW_FOR_ALL_USERS;
import static com.android.server.am.ActivityManagerDebugConfig.*;
-
+import static com.android.server.am.ActivityManagerService.LOCK_SCREEN_SHOWN;
import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE;
import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE;
@@ -1333,6 +1333,11 @@
return false;
}
+ final boolean isLockscreenShown = mService.mLockScreenShown == LOCK_SCREEN_SHOWN;
+ if (isLockscreenShown && !StackId.isAllowedOverLockscreen(mStackId)) {
+ return false;
+ }
+
final ActivityStack focusedStack = mStackSupervisor.getFocusedStack();
final int focusedStackId = focusedStack.mStackId;
@@ -4645,7 +4650,9 @@
voiceInteractor);
// add the task to stack first, mTaskPositioner might need the stack association
addTask(task, toTop, false);
- if (!layoutTaskInStack(task, info.layout) && mBounds != null && task.mResizeable) {
+ final boolean isLockscreenShown = mService.mLockScreenShown == LOCK_SCREEN_SHOWN;
+ if (!layoutTaskInStack(task, info.layout) && mBounds != null && task.mResizeable
+ && !isLockscreenShown) {
task.updateOverrideConfiguration(mBounds);
}
return task;