If the surface of a window is displayed, screenshot

We really really don't care about whether it's actually visible,
onScreen, displayed, winVisible, visibleNow, readyForDisplay or
whatever. The only thing that matters when screenshotting is the
fact whether the surface is shown or not. If it's shown, it must
be good enough for screenshotting. Period.

Test: Go to settings, go to recents, make sure screenshot is taken
all the time.
Bug: 31339431
Change-Id: I5df77ae537b5e70f6cb17e5e18405926135d4312
This commit is contained in:
Jorim Jaggi
2017-01-24 16:21:39 +01:00
parent d51febd995
commit 52e85da8fa

View File

@@ -2282,7 +2282,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
final boolean foundTargetWs =
(w.mAppToken != null && w.mAppToken.token == appToken)
|| (mScreenshotApplicationState.appWin != null && wallpaperOnly);
if (foundTargetWs && w.isVisible() && winAnim.getShown()) {
if (foundTargetWs && winAnim.getShown()) {
mScreenshotApplicationState.screenshotReady = true;
}