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

Commit c9729d7e authored by Todd Lee's avatar Todd Lee Committed by Android (Google) Code Review
Browse files

Merge "Add flag to guard wallpaper token transition change" into main

parents 078be9e9 6cf4a370
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -193,3 +193,14 @@ flag {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "ensure_wallpaper_in_transitions"
  namespace: "windowing_frontend"
  description: "Ensure that wallpaper window tokens are always present/available for collection in transitions"
  bug: "347593088"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
+2 −1
Original line number Diff line number Diff line
@@ -2545,7 +2545,8 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {

            final ChangeInfo changeInfo = changes.get(wc);
            // Reject no-ops, unless wallpaper
            if (!changeInfo.hasChanged() && wc.asWallpaperToken() == null) {
            if (!changeInfo.hasChanged()
                    && (!Flags.ensureWallpaperInTransitions() || wc.asWallpaperToken() == null)) {
                ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
                        "  Rejecting as no-op: %s", wc);
                continue;
+12 −2
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.protolog.common.ProtoLog;
import com.android.internal.util.ToBooleanFunction;
import com.android.server.wallpaper.WallpaperCropper.WallpaperCropUtils;
import com.android.window.flags.Flags;

import java.io.PrintWriter;
import java.util.ArrayList;
@@ -764,10 +765,19 @@ class WallpaperController {

    void collectTopWallpapers(Transition transition) {
        if (mFindResults.hasTopShowWhenLockedWallpaper()) {
            if (Flags.ensureWallpaperInTransitions()) {
                transition.collect(mFindResults.mTopWallpaper.mTopShowWhenLockedWallpaper.mToken);
            } else {
                transition.collect(mFindResults.mTopWallpaper.mTopShowWhenLockedWallpaper);
            }

        }
        if (mFindResults.hasTopHideWhenLockedWallpaper()) {
            if (Flags.ensureWallpaperInTransitions()) {
                transition.collect(mFindResults.mTopWallpaper.mTopHideWhenLockedWallpaper.mToken);
            } else {
                transition.collect(mFindResults.mTopWallpaper.mTopHideWhenLockedWallpaper);
            }
        }
    }