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

Commit 121ded44 authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "WallpaperService: Respond to WM protocol change."

parents 648d4e5e c6036ba8
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -199,6 +199,7 @@ public abstract class WallpaperService extends Service {
        final InsetsSourceControl[] mTempControls = new InsetsSourceControl[0];
        final MergedConfiguration mMergedConfiguration = new MergedConfiguration();
        private final Point mSurfaceSize = new Point();
        private final Point mLastSurfaceSize = new Point();
        private final Matrix mTmpMatrix = new Matrix();
        private final float[] mTmpValues = new float[9];

@@ -908,6 +909,14 @@ public abstract class WallpaperService extends Service {
                    if (mSurfaceControl.isValid()) {
                        mSurfaceHolder.mSurface.copyFrom(mSurfaceControl);
                    }
                    if (!mLastSurfaceSize.equals(mSurfaceSize)) {
                        mLastSurfaceSize.set(mSurfaceSize.x, mSurfaceSize.y);
                        if (mSurfaceControl != null && mSurfaceControl.isValid()) {
                            SurfaceControl.Transaction t = new SurfaceControl.Transaction();
                            t.setBufferSize(mSurfaceControl, mSurfaceSize.x, mSurfaceSize.y);
                            t.apply();
                        }
                    }

                    if (DEBUG) Log.v(TAG, "New surface: " + mSurfaceHolder.mSurface
                            + ", frame=" + mWinFrames);