summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jorim Jaggi <jjaggi@google.com> 2019-06-06 14:03:41 +0200
committer Jorim Jaggi <jjaggi@google.com> 2019-06-11 13:12:38 +0000
commit995e106ad775da3bb77bd9b25f4e014cdf79059c (patch)
tree1e7ea495c5287b0b69bd4d83d339314e7ac0bf61
parent13ee78763d31bf5642105364887ba30321b9373a (diff)
If window isn't requested to be visible, don't consider it
For the -1 overlay in Launcher, we'd like to keep it invisible to reduce global system contention, to avoid allocating a surface when just swiping up. However, this doesn't work yet as we always consider the window as interesting even though it requested to be not visible. To fix that, we only consider a window as interesting if it has also requested to be visible. Note: This doesn't apply for the main window. Test: go/wm-smoke Test: Swipe up with special home APK Bug: 123539527 Change-Id: I19f712051b51fed0435d80442ecb7bd9b0a69f80
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index de9d769a19d1..c6c9e1b39db4 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -1548,7 +1548,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
*/
boolean isInteresting() {
return mAppToken != null && !mAppDied
- && (!mAppToken.isFreezingScreen() || !mAppFreezing);
+ && (!mAppToken.isFreezingScreen() || !mAppFreezing)
+ && mViewVisibility == View.VISIBLE;
}
/**