summaryrefslogtreecommitdiff
path: root/core/java/android/view/WindowlessWindowManager.java
diff options
context:
space:
mode:
authorRiddle Hsu <riddlehsu@google.com>2020-09-03 00:29:30 +0800
committerRiddle Hsu <riddlehsu@google.com>2020-09-10 00:26:11 +0800
commitccaeffc03f275525c9fe66539b2d50f1076303fa (patch)
tree9af20a0e157abb1c9c97b752bf8b06c959e895f1 /core/java/android/view/WindowlessWindowManager.java
parent46969117366fed264cfe0fa8dd49fa5f1b4558cf (diff)
Remove Session#getDisplayFrame
The frame won't be changed if there is no IWindow#resized or IWindowSession#relayout. So it can be retrieved from these methods directly instead of another binder transaction. And because some parameters are usually used together for layout, the parameters are consolidated into a new ClientWindowFrames. That reduces changing the interface in the future if the frame related information needs to be changed. Also refine the resize handling in ViewRootImpl to make it easier to read. There should be no behavior change by this modification. Bug: 161781274 Test: WmTests, DialogFrameTests Change-Id: I9f711ad2023442046fa8582944320b98e7c4ecfa
Diffstat (limited to 'core/java/android/view/WindowlessWindowManager.java')
-rw-r--r--core/java/android/view/WindowlessWindowManager.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/core/java/android/view/WindowlessWindowManager.java b/core/java/android/view/WindowlessWindowManager.java
index 060311ec3da8..368918d28f80 100644
--- a/core/java/android/view/WindowlessWindowManager.java
+++ b/core/java/android/view/WindowlessWindowManager.java
@@ -26,6 +26,7 @@ import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import android.util.MergedConfiguration;
+import android.window.ClientWindowFrames;
import java.util.HashMap;
import java.util.Objects;
@@ -224,9 +225,7 @@ public class WindowlessWindowManager implements IWindowSession {
@Override
public int relayout(IWindow window, int seq, WindowManager.LayoutParams inAttrs,
int requestedWidth, int requestedHeight, int viewFlags, int flags, long frameNumber,
- Rect outFrame, Rect outContentInsets, Rect outVisibleInsets,
- Rect outStableInsets, Rect outBackdropFrame,
- DisplayCutout.ParcelableWrapper cutout, MergedConfiguration mergedConfiguration,
+ ClientWindowFrames outFrames, MergedConfiguration mergedConfiguration,
SurfaceControl outSurfaceControl, InsetsState outInsetsState,
InsetsSourceControl[] outActiveControls, Point outSurfaceSize,
SurfaceControl outBLASTSurfaceControl) {
@@ -255,7 +254,8 @@ public class WindowlessWindowManager implements IWindowSession {
t.hide(sc).apply();
outSurfaceControl.release();
}
- outFrame.set(0, 0, attrs.width, attrs.height);
+ outFrames.frame.set(0, 0, attrs.width, attrs.height);
+ outFrames.displayFrame.set(outFrames.frame);
mergedConfiguration.setConfiguration(mConfiguration, mConfiguration);
@@ -292,11 +292,6 @@ public class WindowlessWindowManager implements IWindowSession {
}
@Override
- public void getDisplayFrame(android.view.IWindow window,
- android.graphics.Rect outDisplayFrame) {
- }
-
- @Override
public void finishDrawing(android.view.IWindow window,
android.view.SurfaceControl.Transaction postDrawTransaction) {
synchronized (this) {