diff options
| author | 2021-09-23 18:23:57 +0800 | |
|---|---|---|
| committer | 2021-09-24 04:58:07 +0000 | |
| commit | 102c525452be15ca5a139d0dfc86d158ea23218b (patch) | |
| tree | 6ed853096ecb057463b59790ebf1013f01dbd00a | |
| parent | 977ab888a5d9a2c4824bf3f903d18258aabf5544 (diff) | |
Modify TaskSnapshotWindow#scheduleRemove
As code review in CL[1] from sc-dev, we should preserve the previous
logic to remove home task snapshot immediately, in order to show latest
content as soon as possible for unlocking to home.
Note that this CL is to sync the logic CL[1] in sc-dev for the
downstream branch (qpr1 and v2, and internal master)
[1] I81031f64966b1aeb55cc09f381d4d83ec3460dc9 (sc-dev)
Bug: 192065018
Test: ateset StartingSurfaceDrawerTests#\
testRemoveTaskSnapshotWithImeSurfaceWhenOnImeDrawn
Test: manual tests by
1) launching Android Message with focusing an editor
2) swiping out to home and launch another apps (e.g. chrome)
3) swiping up to overview, tapping Android Message task
4) verify if IME is flickering after switched back.
Change-Id: Ic0cb07504acc11707327360051612df9cce565bd
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java index 72295148f678..2dce20371993 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java @@ -16,6 +16,7 @@ package com.android.wm.shell.startingsurface; +import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.graphics.Color.WHITE; import static android.graphics.Color.alpha; import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER; @@ -314,6 +315,12 @@ public class TaskSnapshotWindow { } void scheduleRemove(Runnable onRemove) { + // Show the latest content as soon as possible for unlocking to home. + if (mActivityType == ACTIVITY_TYPE_HOME) { + removeImmediately(); + onRemove.run(); + return; + } if (mScheduledRunnable != null) { mSplashScreenExecutor.removeCallbacks(mScheduledRunnable); mScheduledRunnable = null; |