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

Commit 8f66d861 authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge "Mirror WallpaperWindowToken instead of WindowState" into main

parents 2535a652 e41d1c6d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1064,13 +1064,17 @@ class WallpaperController {

    /**
     * Mirrors the visible wallpaper if it's available.
     * <p>
     * We mirror at the WallpaperWindowToken level because scale and translation is applied at
     * the WindowState level and mirroring the WindowState's SurfaceControl will remove any local
     * scale and translation.
     *
     * @return A SurfaceControl for the parent of the mirrored wallpaper.
     */
    SurfaceControl mirrorWallpaperSurface() {
        final WindowState wallpaperWindowState = getTopVisibleWallpaper();
        return wallpaperWindowState != null
                ? SurfaceControl.mirrorSurface(wallpaperWindowState.getSurfaceControl())
                ? SurfaceControl.mirrorSurface(wallpaperWindowState.mToken.getSurfaceControl())
                : null;
    }