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

Commit 151e5b83 authored by Todd Lee's avatar Todd Lee
Browse files

Ensure SurfaceControl is valid before applying transform hint

Bug: b/395874537
Test: presubmits
Flag: NONE exempt trivial guard
Change-Id: Iab6421e3756157e6a3b3c06146fc57d329b04daa
parent 59c660c4
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1323,14 +1323,13 @@ public abstract class WallpaperService extends Service {
                                redrawNeeded ? 1 : 0));
                        return;
                    }

                    final int transformHint = SurfaceControl.rotationToBufferTransform(
                            (mDisplay.getInstallOrientation() + mDisplay.getRotation()) % 4);
                    mSurfaceControl.setTransformHint(transformHint);
                    WindowLayout.computeSurfaceSize(mLayout, maxBounds, mWidth, mHeight,
                            mWinFrames.frame, false /* dragResizing */, mSurfaceSize);

                    if (mSurfaceControl.isValid()) {
                        final int transformHint = SurfaceControl.rotationToBufferTransform(
                            (mDisplay.getInstallOrientation() + mDisplay.getRotation()) % 4);
                        mSurfaceControl.setTransformHint(transformHint);
                        if (mBbqSurfaceControl == null) {
                            mBbqSurfaceControl = new SurfaceControl.Builder()
                                    .setName("Wallpaper BBQ wrapper")