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

Commit fea48c68 authored by Evan Rosky's avatar Evan Rosky
Browse files

Ensure wallpaper "relayout" when first created

Wallpaper combines create/"relayout" into the same function.
After creating, we need to record the creation seqId so that
the rest of the function actually does a layout/draw for the
first frame.

Bug: 385976595
Bug: 430149439
Test: boot timing test
Flag: com.android.window.flags.always_seq_id_layout
Flag: com.android.window.flags.always_seq_id_layout_wear
Change-Id: I65b58d8163542519c3bd92be398fd8486356678e
parent 1074a4d8
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1249,7 +1249,7 @@ public abstract class WallpaperService extends Service {
            final boolean typeChanged = mType != mSurfaceHolder.getRequestedType();
            final boolean flagsChanged = mCurWindowFlags != mWindowFlags ||
                    mCurWindowPrivateFlags != mWindowPrivateFlags;
            final boolean reportDraw = mAlwaysSeqId ? seqId > mSeqId : false;
            boolean reportDraw = mAlwaysSeqId ? seqId > mSeqId : false;
            redrawNeeded = redrawNeeded || reportDraw;
            if (forceRelayout || creating || surfaceCreating || formatChanged || sizeChanged
                    || typeChanged || flagsChanged || redrawNeeded
@@ -1317,6 +1317,11 @@ public abstract class WallpaperService extends Service {
                            Log.w(TAG, "Failed to add window while updating wallpaper surface.");
                            return;
                        }
                        if (mAlwaysSeqId) {
                            seqId = addRes.syncSeqId;
                            reportDraw = reportDraw || seqId > mSeqId;
                            redrawNeeded = redrawNeeded || reportDraw;
                        }
                        mSession.setShouldZoomOutWallpaper(mWindow, shouldZoomOutWallpaper());
                        mCreated = true;