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

Commit 66bf071d authored by Chong Zhang's avatar Chong Zhang
Browse files

Check wallpaper visibility to determine if wallpaper is obscuring apps.

bug: 26948569
Change-Id: I710893ee086dce441cb5e2744fc721d3e1a2fd8a
parent 3bc8dd8e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1259,8 +1259,11 @@ final class WindowState implements WindowManagerPolicy.WindowState {
     * it may obscure windows behind it.
     */
    boolean isOpaqueDrawn() {
        return (mAttrs.format == PixelFormat.OPAQUE
                        || mAttrs.type == TYPE_WALLPAPER)
        // When there is keyguard, wallpaper could be placed over the secure app
        // window but invisible. We need to check wallpaper visibility explicitly
        // to determine if it's occluding apps.
        return ((!mIsWallpaper && mAttrs.format == PixelFormat.OPAQUE)
                || (mIsWallpaper && mWallpaperVisible))
                && isDrawnLw() && mWinAnimator.mAnimation == null
                && (mAppToken == null || mAppToken.mAppAnimator.animation == null);
    }