Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a710346b authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Automerger Merge Worker
Browse files

Merge "Commit wallpaper visibility directly when target token is invisibile"...

Merge "Commit wallpaper visibility directly when target token is invisibile" into udc-qpr-dev am: 009c7c26

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24013308



Change-Id: I50ef7af20c1377242fbf63a78fee85c1b80d69dc
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents fd78daea 009c7c26
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -5660,13 +5660,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        final DisplayContent displayContent = getDisplayContent();
        if (!visible) {
            mImeInsetsFrozenUntilStartInput = true;
            if (usingShellTransitions) {
                final WindowState wallpaperTarget =
                        displayContent.mWallpaperController.getWallpaperTarget();
                if (wallpaperTarget != null && wallpaperTarget.mActivityRecord == this) {
                    displayContent.mWallpaperController.hideWallpapers(wallpaperTarget);
                }
            }
        }

        if (!displayContent.mClosingApps.contains(this)
+14 −10
Original line number Diff line number Diff line
@@ -1191,16 +1191,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
                hasParticipatedDisplay = true;
                continue;
            }
            final WallpaperWindowToken wt = participant.asWallpaperToken();
            if (wt != null) {
                final boolean visibleAtTransitionEnd = mVisibleAtTransitionEndTokens.contains(wt);
                if (!visibleAtTransitionEnd && !wt.isVisibleRequested()) {
                    ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
                            "  Commit wallpaper becoming invisible: %s", wt);
                    wt.commitVisibility(false /* visible */);
                }
                continue;
            }
            final Task tr = participant.asTask();
            if (tr != null && tr.isVisibleRequested() && tr.inPinnedWindowingMode()) {
                final ActivityRecord top = tr.getTopNonFinishingActivity();
@@ -1220,6 +1210,20 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
                }
            }
        }
        // Commit wallpaper visibility after activity, because usually the wallpaper target token is
        // an activity, and wallpaper's visibility is depends on activity's visibility.
        for (int i = mParticipants.size() - 1; i >= 0; --i) {
            final WallpaperWindowToken wt = mParticipants.valueAt(i).asWallpaperToken();
            if (wt == null) continue;
            final WindowState target = wt.mDisplayContent.mWallpaperController.getWallpaperTarget();
            final boolean isTargetInvisible = target == null || !target.mToken.isVisible();
            if (isTargetInvisible || (!wt.isVisibleRequested()
                    && !mVisibleAtTransitionEndTokens.contains(wt))) {
                ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
                        "  Commit wallpaper becoming invisible: %s", wt);
                wt.commitVisibility(false /* visible */);
            }
        }
        if (committedSomeInvisible) {
            mController.onCommittedInvisibles();
        }