Check wallpaper visibility to determine if wallpaper is obscuring apps.

bug: 26948569
Change-Id: I710893ee086dce441cb5e2744fc721d3e1a2fd8a
This commit is contained in:
Chong Zhang
2016-02-05 14:42:36 -08:00
parent 3bc8dd8edd
commit 66bf071d11

View File

@@ -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);
}