From 406386a894340d0e4460b363df6250bb5b13294f Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Fri, 15 Sep 2017 14:17:40 +0200 Subject: Don't take invisible screenshots This fixes a bug where we took a snapshot of a task while the surface wasn't visible yet. The transition was set-up so the win animator was already shown but translucency was set to 0, leading that the snapshot is a black screen. We fixed this by also checking whether the alpha is non-zero. Fixes a bug where launching a Hangouts notification from the lockscreen causes a black flicker. When we launch the activity, the Hangouts activity is in the mClosingApps list, because it's immediately hidden from the lockscreen, which means we try to take a snapshot. Shortly after that we reopen the activity because Keyguard is going away, so we try to reuse a snapshot. Test: go/wm-smoke Test: Open hangouts, close hangouts with back button, go to Keyguard, receive message, launch notification Change-Id: Iffc1db1a738800c90a2421a5f90174d647eb4440 Fixes: 65695379 --- services/core/java/com/android/server/wm/DisplayContent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 5cd4fc480275..37695cba7b9d 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -3020,7 +3020,7 @@ class DisplayContent extends WindowContainer 0f) { mScreenshotApplicationState.screenshotReady = true; } -- cgit v1.2.3-59-g8ed1b