From f14e93e40da07b389dee2e2f472580565ab15a43 Mon Sep 17 00:00:00 2001 From: "lei.xa.liu" Date: Tue, 20 Sep 2016 21:37:25 +0900 Subject: [PATCH] Remove redundant lockscreen shown check Symptom: USB dialog is displayed incompletely and cannot be scrolled under lockscreen in multi-window mode. Root cause: When lockscreen is shown, the bounds returned by getLaunchBounds() is null, updateOverrideConfiguration() will finally consider the task as fullscreen, USB dialog is under lockscreen, not over lockscreen, as a result, the height measured in ViewRootImpl's performTraversals() will be incorrect. Solution: Remove the lockscreen shown check from getLaunchBounds() which is originally added to fix app over lockscreen being cropped by docked stack, and the following commit also fix the behavior of app over lockscreen. https://android.googlesource.com/platform/frameworks/base/+/99732940809058fae558618399323c36b8a0e856 So that above check should be redundant code. Bug: 31256862 Fixes: 36163229 Test: manual Change-Id: Iac483f625d2f4b35388290eb78a97a4bd3bd0fe8 --- services/core/java/com/android/server/am/TaskRecord.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java index dc636e53b18cc..056fec5265026 100644 --- a/services/core/java/com/android/server/am/TaskRecord.java +++ b/services/core/java/com/android/server/am/TaskRecord.java @@ -2212,11 +2212,6 @@ final class TaskRecord extends ConfigurationContainer implements TaskWindowConta /** Returns the bounds that should be used to launch this task. */ Rect getLaunchBounds() { - // If we're over lockscreen, forget about stack bounds and use fullscreen. - if (mService.mStackSupervisor.mKeyguardController.isKeyguardShowing()) { - return null; - } - if (mStack == null) { return null; }