Set fit insets type for decor insets test am: 614ed9e0e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23468179 Change-Id: Ib8ce851896cb6e24475b990b449126c519fa292d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -362,10 +362,12 @@ public class DisplayPolicyTests extends WindowTestsBase {
|
|||||||
new InsetsFrameProvider(bar2, 0, WindowInsets.Type.statusBars())
|
new InsetsFrameProvider(bar2, 0, WindowInsets.Type.statusBars())
|
||||||
.setInsetsSize(Insets.of(0, STATUS_BAR_HEIGHT, 0, 0))
|
.setInsetsSize(Insets.of(0, STATUS_BAR_HEIGHT, 0, 0))
|
||||||
};
|
};
|
||||||
|
bar2.mAttrs.setFitInsetsTypes(0);
|
||||||
bar2.mAttrs.paramsForRotation = new WindowManager.LayoutParams[4];
|
bar2.mAttrs.paramsForRotation = new WindowManager.LayoutParams[4];
|
||||||
final int doubleHeightFor90 = STATUS_BAR_HEIGHT * 2;
|
final int doubleHeightFor90 = STATUS_BAR_HEIGHT * 2;
|
||||||
for (int i = ROTATION_0; i <= Surface.ROTATION_270; i++) {
|
for (int i = ROTATION_0; i <= Surface.ROTATION_270; i++) {
|
||||||
final WindowManager.LayoutParams params = new WindowManager.LayoutParams();
|
final WindowManager.LayoutParams params = new WindowManager.LayoutParams();
|
||||||
|
params.setFitInsetsTypes(0);
|
||||||
if (i == Surface.ROTATION_90) {
|
if (i == Surface.ROTATION_90) {
|
||||||
params.providedInsets = new InsetsFrameProvider[] {
|
params.providedInsets = new InsetsFrameProvider[] {
|
||||||
new InsetsFrameProvider(bar2, 0, WindowInsets.Type.statusBars())
|
new InsetsFrameProvider(bar2, 0, WindowInsets.Type.statusBars())
|
||||||
|
|||||||
@@ -485,6 +485,7 @@ class WindowTestsBase extends SystemServiceTestsBase {
|
|||||||
new InsetsFrameProvider(owner, 0, WindowInsets.Type.statusBars())
|
new InsetsFrameProvider(owner, 0, WindowInsets.Type.statusBars())
|
||||||
.setInsetsSize(Insets.of(0, STATUS_BAR_HEIGHT, 0, 0))
|
.setInsetsSize(Insets.of(0, STATUS_BAR_HEIGHT, 0, 0))
|
||||||
};
|
};
|
||||||
|
statusBar.mAttrs.setFitInsetsTypes(0);
|
||||||
dc.getDisplayPolicy().addWindowLw(statusBar, statusBar.mAttrs);
|
dc.getDisplayPolicy().addWindowLw(statusBar, statusBar.mAttrs);
|
||||||
return statusBar;
|
return statusBar;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user