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

Commit 8de3b785 authored by Lucas Dupin's avatar Lucas Dupin Committed by Android (Google) Code Review
Browse files

Merge "Fix default wallpaper transition issue" into qt-qpr1-dev

parents cf1268a5 c6e84a13
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -111,7 +111,12 @@ public class ImageWallpaperRenderer implements GLWallpaperRenderer,
            mBitmap = mWallpaperManager.getBitmap();
            mWallpaperManager.forgetLoadedWallpaper();
            if (mBitmap != null) {
                mSurfaceSize.set(0, 0, mBitmap.getWidth(), mBitmap.getHeight());
                float scale = (float) mScissor.height() / mBitmap.getHeight();
                int surfaceHeight = Math.max(mScissor.height(), mBitmap.getHeight());
                int surfaceWidth = scale > 1f
                        ? Math.round(mBitmap.getWidth() * scale)
                        : mBitmap.getWidth();
                mSurfaceSize.set(0, 0, surfaceWidth, surfaceHeight);
            }
        }
        return mBitmap != null;