/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/ |
D | WmDisplayCutoutTest.java | 58 WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in calculateRelativeTo_top() local 62 assertEquals(new Rect(0, 15, 0, 0), cutout.getDisplayCutout().getSafeInsets()); in calculateRelativeTo_top() 67 WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in calculateRelativeTo_left() local 71 assertEquals(new Rect(15, 0, 0, 0), cutout.getDisplayCutout().getSafeInsets()); in calculateRelativeTo_left() 76 WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in calculateRelativeTo_bottom() local 80 assertEquals(new Rect(0, 0, 0, 15), cutout.getDisplayCutout().getSafeInsets()); in calculateRelativeTo_bottom() 85 WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in calculateRelativeTo_right() local 89 assertEquals(new Rect(0, 0, 15, 0), cutout.getDisplayCutout().getSafeInsets()); in calculateRelativeTo_right() 94 WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in calculateRelativeTo_bounds() local 98 assertThat(cutout.getDisplayCutout().getBoundingRectTop(), in calculateRelativeTo_bounds() [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | DisplayCutoutTest.java | 162 DisplayCutout cutout = in testGetWaterfallInsets() local 164 assertEquals(Insets.of(5, 6, 7, 8), cutout.getWaterfallInsets()); in testGetWaterfallInsets() 187 DisplayCutout cutout = mCutoutTop.inset(1, 2, 3, 4); in inset_immutable() local 194 DisplayCutout cutout = createCutoutWithInsets(100, 0, 0, 0).inset(1, 2, 3, 4); in inset_insets_withLeftCutout() local 196 assertEquals(99, cutout.getSafeInsetLeft()); in inset_insets_withLeftCutout() 197 assertEquals(0, cutout.getSafeInsetTop()); in inset_insets_withLeftCutout() 198 assertEquals(0, cutout.getSafeInsetRight()); in inset_insets_withLeftCutout() 199 assertEquals(0, cutout.getSafeInsetBottom()); in inset_insets_withLeftCutout() 204 DisplayCutout cutout = mCutoutTop.inset(1, 2, 3, 4); in inset_insets_withTopCutout() local 206 assertEquals(0, cutout.getSafeInsetLeft()); in inset_insets_withTopCutout() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | StatusBarWindowView.java | 95 DisplayCutout cutout, Pair<Integer, Integer> cornerCutoutPadding, in paddingNeededForCutoutAndRoundedCorner() argument 97 if (cutout == null) { in paddingNeededForCutoutAndRoundedCorner() 102 int leftCornerCutoutPadding = cutout.getSafeInsetLeft(); in paddingNeededForCutoutAndRoundedCorner() 103 int rightCornerCutoutPadding = cutout.getSafeInsetRight(); in paddingNeededForCutoutAndRoundedCorner() 119 public static Pair<Integer, Integer> cornerCutoutMargins(DisplayCutout cutout, in cornerCutoutMargins() argument 121 return statusBarCornerCutoutMargins(cutout, display, RotationUtils.ROTATION_NONE, 0); in cornerCutoutMargins() 127 public static Pair<Integer, Integer> statusBarCornerCutoutMargins(DisplayCutout cutout, in statusBarCornerCutoutMargins() argument 129 if (cutout == null) { in statusBarCornerCutoutMargins() 138 boundsFromDirection(cutout, Gravity.LEFT, bounds); in statusBarCornerCutoutMargins() 141 boundsFromDirection(cutout, Gravity.RIGHT, bounds); in statusBarCornerCutoutMargins() [all …]
|
D | StatusBarTouchableRegionManager.java | 231 DisplayCutout cutout = windowInsets.getDisplayCutout(); in updateRegionForNotch() local 232 if (cutout == null) { in updateRegionForNotch() 239 ScreenDecorations.DisplayCutoutView.boundsFromDirection(cutout, Gravity.TOP, bounds); in updateRegionForNotch()
|
D | HeadsUpAppearanceController.java | 228 DisplayCutout cutout = (windowInset != null) ? windowInset.getDisplayCutout() : null; in getRtlTranslation() local 231 int cutoutLeft = (cutout != null) ? cutout.getSafeInsetLeft() : 0; in getRtlTranslation() 232 int cutoutRight = (cutout != null) ? cutout.getSafeInsetRight() : 0; in getRtlTranslation()
|
/frameworks/base/services/core/java/com/android/server/wm/utils/ |
D | WmDisplayCutout.java | 118 private static Rect computeSafeInsets(Size displaySize, DisplayCutout cutout) { in computeSafeInsets() argument 121 " cutout=" + cutout); in computeSafeInsets() 124 int leftInset = Math.max(cutout.getWaterfallInsets().left, in computeSafeInsets() 125 findCutoutInsetForSide(displaySize, cutout.getBoundingRectLeft(), Gravity.LEFT)); in computeSafeInsets() 126 int topInset = Math.max(cutout.getWaterfallInsets().top, in computeSafeInsets() 127 findCutoutInsetForSide(displaySize, cutout.getBoundingRectTop(), Gravity.TOP)); in computeSafeInsets() 128 int rightInset = Math.max(cutout.getWaterfallInsets().right, in computeSafeInsets() 129 findCutoutInsetForSide(displaySize, cutout.getBoundingRectRight(), Gravity.RIGHT)); in computeSafeInsets() 130 int bottomInset = Math.max(cutout.getWaterfallInsets().bottom, in computeSafeInsets() 131 findCutoutInsetForSide(displaySize, cutout.getBoundingRectBottom(), in computeSafeInsets()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/wm/ |
D | DisplayLayout.java | 355 DisplayCutout cutout, int rotation, int displayWidth, int displayHeight) { in calculateDisplayCutoutForRotation() argument 356 if (cutout == null || cutout == DisplayCutout.NO_CUTOUT) { in calculateDisplayCutoutForRotation() 360 RotationUtils.rotateInsets(cutout.getWaterfallInsets(), rotation); in calculateDisplayCutoutForRotation() 362 return computeSafeInsets(cutout, displayWidth, displayHeight); in calculateDisplayCutoutForRotation() 365 Rect[] cutoutRects = cutout.getBoundingRectsAll(); in calculateDisplayCutoutForRotation() 400 Size displaySize, DisplayCutout cutout) { in computeSafeInsets() argument 403 + " cutout=" + cutout); in computeSafeInsets() 406 int leftInset = Math.max(cutout.getWaterfallInsets().left, in computeSafeInsets() 407 findCutoutInsetForSide(displaySize, cutout.getBoundingRectLeft(), Gravity.LEFT)); in computeSafeInsets() 408 int topInset = Math.max(cutout.getWaterfallInsets().top, in computeSafeInsets() [all …]
|
D | SystemWindows.java | 287 DisplayCutout.ParcelableWrapper cutout, MergedConfiguration mergedConfiguration, in relayout() argument 294 cutout, mergedConfiguration, outSurfaceControl, outInsetsState, in relayout()
|
/frameworks/base/core/java/android/window/ |
D | WindowMetricsHelper.java | 56 final DisplayCutout cutout = windowInsets.getDisplayCutout(); in getBoundsExcludingNavigationBarAndCutout() local 57 insets = (cutout != null) ? Insets.max(insets, Insets.of(cutout.getSafeInsets())) in getBoundsExcludingNavigationBarAndCutout()
|
/frameworks/base/core/java/android/view/ |
D | DisplayCutout.java | 747 final DisplayCutout cutout = new DisplayCutout( in pathAndDisplayCutoutFromSpec() local 750 final Pair<Path, DisplayCutout> result = new Pair<>(cutoutSpec.getPath(), cutout); in pathAndDisplayCutoutFromSpec() 785 public ParcelableWrapper(DisplayCutout cutout) { in ParcelableWrapper() argument 786 mInner = cutout; in ParcelableWrapper() 804 public static void writeCutoutToParcel(DisplayCutout cutout, Parcel out, int flags) { in writeCutoutToParcel() argument 805 if (cutout == null) { in writeCutoutToParcel() 807 } else if (cutout == NO_CUTOUT) { in writeCutoutToParcel() 811 out.writeTypedObject(cutout.mSafeInsets, flags); in writeCutoutToParcel() 812 out.writeTypedArray(cutout.mBounds.getRects(), flags); in writeCutoutToParcel() 813 out.writeTypedObject(cutout.mWaterfallInsets, flags); in writeCutoutToParcel() [all …]
|
D | DisplayAdjustments.java | 193 public FixedRotationAdjustments(@Surface.Rotation int rotation, DisplayCutout cutout) { in FixedRotationAdjustments() argument 195 mRotatedDisplayCutout = cutout; in FixedRotationAdjustments()
|
D | InsetsController.java | 709 boolean alwaysConsumeSystemBars, DisplayCutout cutout, in calculateInsets() argument 714 mLastDisplayCutout = cutout; in calculateInsets() 716 isScreenRound, alwaysConsumeSystemBars, cutout, in calculateInsets()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | DisplayPolicyTestsBase.java | 117 WmDisplayCutout cutout = null; in displayInfoAndCutoutForRotation() local 124 cutout = WmDisplayCutout.computeSafeInsets( in displayInfoAndCutoutForRotation() 127 info.displayCutout = cutout.getDisplayCutout(); in displayInfoAndCutoutForRotation() 131 return Pair.create(info, cutout); in displayInfoAndCutoutForRotation()
|
D | WallpaperControllerTests.java | 146 final WmDisplayCutout cutout = dc.calculateDisplayCutoutForRotation(Surface.ROTATION_0); in testWallpaperSizeWithFixedTransform() local 147 final DisplayFrames displayFrames = new DisplayFrames(dc.getDisplayId(), info, cutout); in testWallpaperSizeWithFixedTransform()
|
D | WindowStateTests.java | 515 final DisplayCutout cutout = new DisplayCutout( in testDisplayCutoutIsCalculatedRelativeToFrame() local 521 wf.setDisplayCutout(new WmDisplayCutout(cutout, new Size(200, 400))); in testDisplayCutoutIsCalculatedRelativeToFrame() 524 assertThat(app.getWmDisplayCutout().getDisplayCutout(), is(cutout.inset(7, 10, 5, 20))); in testDisplayCutoutIsCalculatedRelativeToFrame()
|
D | DisplayContentTests.java | 580 final DisplayCutout cutout = new WmDisplayCutout( in testDisplayCutout_rot0() local 584 dc.mInitialDisplayCutout = cutout; in testDisplayCutout_rot0() 588 assertEquals(cutout, dc.getDisplayInfo().displayCutout); in testDisplayCutout_rot0() 615 final DisplayCutout cutout = new WmDisplayCutout( in testDisplayCutout_rot90() local 619 dc.mInitialDisplayCutout = cutout; in testDisplayCutout_rot90()
|
D | WindowFrameTests.java | 426 final WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in testDisplayCutout() local 432 windowFrames.setDisplayCutout(cutout); in testDisplayCutout()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/animation/ |
D | ExpandedAnimationController.java | 641 DisplayCutout cutout = insets.getDisplayCutout(); in getAvailableScreenWidth() local 642 if (cutout != null) { in getAvailableScreenWidth() 643 cutoutLeft = cutout.getSafeInsetLeft(); in getAvailableScreenWidth() 644 cutoutRight = cutout.getSafeInsetRight(); in getAvailableScreenWidth()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
D | ScreenDecorations.java | 268 final DisplayCutout cutout = getCutout(); in setupDecorations() local 269 final Rect[] bounds = cutout == null ? null : cutout.getBoundingRectsAll(); in setupDecorations() 674 DisplayCutout cutout = getCutout(); in shouldShowRoundedCorner() local 676 final boolean emptyBoundsOrWaterfall = cutout == null || cutout.isBoundsEmpty(); in shouldShowRoundedCorner() 681 if (emptyBoundsOrWaterfall || !cutout.getBoundingRectsAll()[rotatedTop].isEmpty() in shouldShowRoundedCorner() 682 || !cutout.getBoundingRectsAll()[rotatedBottom].isEmpty()) { in shouldShowRoundedCorner()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/widget/ |
D | ActionBarOverlayLayoutTest.java | 170 private WindowInsets insetsWith(Insets content, DisplayCutout cutout) { in insetsWith() argument 171 return new WindowInsets(content.toRect(), null, false, false, cutout); in insetsWith()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/ |
D | QuickStatusBarHeader.java | 450 DisplayCutout cutout = insets.getDisplayCutout(); in onApplyWindowInsets() local 452 cutout, getDisplay()); in onApplyWindowInsets() 455 cutout, cornerCutoutPadding, -1); in onApplyWindowInsets() 458 mWaterfallTopInset = cutout == null ? 0 : cutout.getWaterfallInsets().top; in onApplyWindowInsets()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | Session.java | 206 DisplayCutout.ParcelableWrapper cutout, MergedConfiguration mergedConfiguration, in relayout() argument 216 outStableInsets, outBackdropFrame, cutout, in relayout()
|
D | DisplayContent.java | 1626 final WmDisplayCutout cutout = calculateDisplayCutoutForRotation(rotation); in startFixedRotationTransform() local 1627 final DisplayFrames displayFrames = new DisplayFrames(mDisplayId, info, cutout); in startFixedRotationTransform() 1837 DisplayCutout cutout, int rotation) { in calculateDisplayCutoutForRotationUncached() argument 1838 if (cutout == null || cutout == DisplayCutout.NO_CUTOUT) { in calculateDisplayCutoutForRotationUncached() 1842 RotationUtils.rotateInsets(cutout.getWaterfallInsets(), rotation); in calculateDisplayCutoutForRotationUncached() 1845 cutout, mInitialDisplayWidth, mInitialDisplayHeight); in calculateDisplayCutoutForRotationUncached() 1849 cutout.getBoundingRectsAll(), in calculateDisplayCutoutForRotationUncached()
|
/frameworks/base/core/proto/android/server/ |
D | windowmanagerservice.proto | 367 optional .android.view.DisplayCutoutProto cutout = 33 [deprecated=true]; field 480 optional .android.view.DisplayCutoutProto cutout = 10; field
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/ |
D | BubbleStackView.java | 946 DisplayCutout cutout = insets.getDisplayCutout(); in BubbleStackView() 947 if (cutout != null) { in BubbleStackView() 948 cutoutLeft = cutout.getSafeInsetLeft(); in BubbleStackView() 949 cutoutRight = cutout.getSafeInsetRight(); in BubbleStackView()
|