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
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 73e88c1..914cc8d 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -2282,7 +2282,7 @@
                 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;
                 }