From 92180ed059146bf33c42c1d435b1fcc24f35f844 Mon Sep 17 00:00:00 2001 From: Marzia Favaro Date: Wed, 17 May 2023 01:23:06 +0000 Subject: Move wallpaper transition leashes to the back Fix: 282852886 Change-Id: I38bcdd7e5f5e12f0ccd1bb3c80d0b5942366e31d --- .../Shell/src/com/android/wm/shell/util/TransitionUtil.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java b/libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java index 6d37e58c59ad..ad24428688ee 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/util/TransitionUtil.java @@ -24,9 +24,7 @@ import static android.view.WindowManager.LayoutParams.INVALID_WINDOW_TYPE; import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER; import static android.view.WindowManager.TRANSIT_CHANGE; import static android.view.WindowManager.TRANSIT_CLOSE; -import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY; import static android.view.WindowManager.TRANSIT_KEYGUARD_GOING_AWAY; -import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE; import static android.view.WindowManager.TRANSIT_OPEN; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; @@ -178,7 +176,14 @@ public class TransitionUtil { } // Put all the OPEN/SHOW on top - if (TransitionUtil.isOpeningType(mode)) { + if ((change.getFlags() & FLAG_IS_WALLPAPER) != 0) { + // Wallpaper is always at the bottom, opening wallpaper on top of closing one. + if (mode == WindowManager.TRANSIT_OPEN || mode == WindowManager.TRANSIT_TO_FRONT) { + t.setLayer(leash, -zSplitLine + info.getChanges().size() - layer); + } else { + t.setLayer(leash, -zSplitLine - layer); + } + } else if (TransitionUtil.isOpeningType(mode)) { if (isOpening) { t.setLayer(leash, zSplitLine + info.getChanges().size() - layer); if ((change.getFlags() & FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT) == 0) { -- cgit v1.2.3-59-g8ed1b