Introduced WindowContainer.hasContentToDisplay

We have lots of "is visible" methods and this change is an attempt
to rename one of the methods to match closer to what is actually does
and differentiate it from other "is visible" methods.

WC.hasContentToDisplay() returns true if the container or one of its
children as some content it can display or wants to display
(e.g. app views or saved surface).

WC.isVisible() returns true if the container or one of its children
is considered visible from the WindowManager perspective which usually
means valid surface and some other internal state are true.

Bug: 30060889
Change-Id: Ifbd6c277eb65a53b8035b6f34fc45196962632c1
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index 47b5f3d..d7e7f81 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -359,6 +359,15 @@
     }
 
     @Override
+    boolean isVisible() {
+        if (hidden) {
+            // TODO: Should this be checking hiddenRequested instead of hidden?
+            return false;
+        }
+        return super.isVisible();
+    }
+
+    @Override
     void removeIfPossible() {
         mIsExiting = false;
         removeAllWindows();