summaryrefslogtreecommitdiff
path: root/core/java/android/view/WindowlessWindowManager.java
diff options
context:
space:
mode:
authorTiger Huang <tigerhuang@google.com>2020-10-06 00:42:51 +0800
committerTiger Huang <tigerhuang@google.com>2020-10-16 16:38:08 +0800
commitbf015c77b4113e97c0c82423f9aa177c23daa508 (patch)
tree2a4c3cd53ee9c0298f93a383d6ca8652ff8b1d80 /core/java/android/view/WindowlessWindowManager.java
parent1f6dce13bb827cd3b8d613fc67cc9c1850e41b69 (diff)
Make the requested visibility always up-to-date
The new logic sends the requested visibility to server even when the client doesn't have a control. This makes the requested visibility reliable at the server side. This CL also changes getRequestedState to getRequestedVisibility in WindowState, because the frames in getRequestedState are not reliable. Fix: 161247175 Fix: 166819574 Test: atest DisplayPolicyLayoutTests DisplayPolicyTests InsetsPolicyTest InsetsSourceProviderTest InsetsStateControllerTest WindowStateTests InsetsAnimationControlImplTest InsetsControllerTest WindowAddRemovePerfTest ActivityRecordTests Change-Id: I7d32dacaa1302bab61386f5bd69aaa7dde953ebe
Diffstat (limited to 'core/java/android/view/WindowlessWindowManager.java')
-rw-r--r--core/java/android/view/WindowlessWindowManager.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/java/android/view/WindowlessWindowManager.java b/core/java/android/view/WindowlessWindowManager.java
index 0c221eddf1a9..814787347b75 100644
--- a/core/java/android/view/WindowlessWindowManager.java
+++ b/core/java/android/view/WindowlessWindowManager.java
@@ -130,8 +130,8 @@ public class WindowlessWindowManager implements IWindowSession {
*/
@Override
public int addToDisplay(IWindow window, WindowManager.LayoutParams attrs,
- int viewVisibility, int displayId, Rect outFrame, Rect outContentInsets,
- Rect outStableInsets,
+ int viewVisibility, int displayId, InsetsState requestedVisibility, Rect outFrame,
+ Rect outContentInsets, Rect outStableInsets,
DisplayCutout.ParcelableWrapper outDisplayCutout, InputChannel outInputChannel,
InsetsState outInsetsState, InsetsSourceControl[] outActiveControls) {
final SurfaceControl.Builder b = new SurfaceControl.Builder(mSurfaceSession)
@@ -166,11 +166,11 @@ public class WindowlessWindowManager implements IWindowSession {
*/
@Override
public int addToDisplayAsUser(IWindow window, WindowManager.LayoutParams attrs,
- int viewVisibility, int displayId, int userId, Rect outFrame,
- Rect outContentInsets, Rect outStableInsets,
+ int viewVisibility, int displayId, int userId, InsetsState requestedVisibility,
+ Rect outFrame, Rect outContentInsets, Rect outStableInsets,
DisplayCutout.ParcelableWrapper outDisplayCutout, InputChannel outInputChannel,
InsetsState outInsetsState, InsetsSourceControl[] outActiveControls) {
- return addToDisplay(window, attrs, viewVisibility, displayId,
+ return addToDisplay(window, attrs, viewVisibility, displayId, requestedVisibility,
outFrame, outContentInsets, outStableInsets, outDisplayCutout, outInputChannel,
outInsetsState, outActiveControls);
}