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

Commit 6985a921 authored by Todd Lee's avatar Todd Lee Committed by Android Build Coastguard Worker
Browse files

Add flag to guard wallpaper token transition change

Bug: b/347593088
Flag: com.android.window.flags.ensure_wallpaper_in_transitions
Test: presubmits
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6cf4a370b32f6d979caacb57375d8c0c434bd4ac)
Merged-In: Idda8e20b4362de965f6256cedff829e4bbd8ffb1
Change-Id: Idda8e20b4362de965f6256cedff829e4bbd8ffb1
parent 7d2b3bc9
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
@@ -2546,7 +2546,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);
            }
        }
    }