/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/ |
D | WmDisplayCutoutTest.java | 56 WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in computeSafeInsets_cutoutTop() local 59 assertEquals(new Rect(0, 20, 0, 0), cutout.getDisplayCutout().getSafeInsets()); in computeSafeInsets_cutoutTop() 64 WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in computeSafeInsets_cutoutLeft() local 67 assertEquals(new Rect(20, 0, 0, 0), cutout.getDisplayCutout().getSafeInsets()); in computeSafeInsets_cutoutLeft() 72 WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in computeSafeInsets_cutoutBottom() local 75 assertEquals(new Rect(0, 0, 0, 20), cutout.getDisplayCutout().getSafeInsets()); in computeSafeInsets_cutoutBottom() 80 WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in computeSafeInsets_cutoutRight() local 83 assertEquals(new Rect(0, 0, 20, 0), cutout.getDisplayCutout().getSafeInsets()); in computeSafeInsets_cutoutRight() 88 WmDisplayCutout cutout = WmDisplayCutout.computeSafeInsets( in computeSafeInsets_topLeftCornerCutout_portrait() local 91 assertEquals(new Rect(0, 20, 0, 0), cutout.getDisplayCutout().getSafeInsets()); in computeSafeInsets_topLeftCornerCutout_portrait() [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | DisplayCutoutTest.java | 167 DisplayCutout cutout = in testGetWaterfallInsets() local 169 assertEquals(Insets.of(5, 6, 7, 8), cutout.getWaterfallInsets()); in testGetWaterfallInsets() 178 final DisplayCutout cutout = fromSpec(cutoutSpecString, displayWidth, displayHeight, in testGetCutoutPath() local 180 assertThat(cutout.getCutoutPath(), notNullValue()); in testGetCutoutPath() 214 final DisplayCutout cutout = fromSpec(cutoutSpecString, displayWidth, displayHeight, in testGetCutoutPathParserInfo() local 216 assertThat(displayWidth, equalTo(cutout.getCutoutPathParserInfo().getDisplayWidth())); in testGetCutoutPathParserInfo() 217 assertThat(displayHeight, equalTo(cutout.getCutoutPathParserInfo().getDisplayHeight())); in testGetCutoutPathParserInfo() 218 assertThat(density, equalTo(cutout.getCutoutPathParserInfo().getDensity())); in testGetCutoutPathParserInfo() 220 equalTo(cutout.getCutoutPathParserInfo().getCutoutSpec())); in testGetCutoutPathParserInfo() 221 assertThat(0, equalTo(cutout.getCutoutPathParserInfo().getRotation())); in testGetCutoutPathParserInfo() [all …]
|
D | InsetsStateTest.java | 462 DisplayCutout cutout = mState.calculateInsets(new Rect(1, 1, 199, 300), null, false, false, in testCalculateRelativeCutout() local 465 assertEquals(0, cutout.getSafeInsetLeft()); in testCalculateRelativeCutout() 466 assertEquals(1, cutout.getSafeInsetTop()); in testCalculateRelativeCutout() 467 assertEquals(2, cutout.getSafeInsetRight()); in testCalculateRelativeCutout() 468 assertEquals(4, cutout.getSafeInsetBottom()); in testCalculateRelativeCutout() 470 cutout.getBoundingRectLeft()); in testCalculateRelativeCutout() 472 cutout.getBoundingRectTop()); in testCalculateRelativeCutout() 474 cutout.getBoundingRectRight()); in testCalculateRelativeCutout() 476 cutout.getBoundingRectBottom()); in testCalculateRelativeCutout()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | DisplayFrames.java | 85 final DisplayCutout cutout = displayCutout.getDisplayCutout(); in onDisplayInfoUpdated() local 87 && state.getDisplayCutout().equals(cutout) in onDisplayInfoUpdated() 98 state.setDisplayCutout(cutout); in onDisplayInfoUpdated() 101 if (!cutout.isEmpty()) { in onDisplayInfoUpdated() 102 if (cutout.getSafeInsetLeft() > 0) { in onDisplayInfoUpdated() 103 safe.left = unrestricted.left + cutout.getSafeInsetLeft(); in onDisplayInfoUpdated() 105 if (cutout.getSafeInsetTop() > 0) { in onDisplayInfoUpdated() 106 safe.top = unrestricted.top + cutout.getSafeInsetTop(); in onDisplayInfoUpdated() 108 if (cutout.getSafeInsetRight() > 0) { in onDisplayInfoUpdated() 109 safe.right = unrestricted.right - cutout.getSafeInsetRight(); in onDisplayInfoUpdated() [all …]
|
D | DisplayContent.java | 1755 final WmDisplayCutout cutout = calculateDisplayCutoutForRotation(rotation); in startFixedRotationTransform() local 1760 cutout, roundedCorners, indicatorBounds); in startFixedRotationTransform() 2017 DisplayCutout cutout, int rotation) { in calculateDisplayCutoutForRotationUncached() argument 2018 if (cutout == null || cutout == DisplayCutout.NO_CUTOUT) { in calculateDisplayCutoutForRotationUncached() 2023 cutout, mInitialDisplayWidth, mInitialDisplayHeight); in calculateDisplayCutoutForRotationUncached() 2026 RotationUtils.rotateInsets(cutout.getWaterfallInsets(), rotation); in calculateDisplayCutoutForRotationUncached() 2029 cutout.getBoundingRectsAll(), in calculateDisplayCutoutForRotationUncached() 2031 final CutoutPathParserInfo info = cutout.getCutoutPathParserInfo(); in calculateDisplayCutoutForRotationUncached()
|
D | ActivityRecord.java | 8755 final DisplayCutout cutout = display.calculateDisplayCutoutForRotation(rotation) in CompatDisplayInsets() local 8757 policy.getNonDecorInsetsLw(rotation, dw, dh, cutout, mNonDecorInsets[rotation]); in CompatDisplayInsets()
|
/frameworks/base/services/core/java/com/android/server/wm/utils/ |
D | WmDisplayCutout.java | 69 private static Rect computeSafeInsets(Size displaySize, DisplayCutout cutout) { in computeSafeInsets() argument 72 " cutout=" + cutout); in computeSafeInsets() 75 int leftInset = Math.max(cutout.getWaterfallInsets().left, in computeSafeInsets() 76 findCutoutInsetForSide(displaySize, cutout.getBoundingRectLeft(), Gravity.LEFT)); in computeSafeInsets() 77 int topInset = Math.max(cutout.getWaterfallInsets().top, in computeSafeInsets() 78 findCutoutInsetForSide(displaySize, cutout.getBoundingRectTop(), Gravity.TOP)); in computeSafeInsets() 79 int rightInset = Math.max(cutout.getWaterfallInsets().right, in computeSafeInsets() 80 findCutoutInsetForSide(displaySize, cutout.getBoundingRectRight(), Gravity.RIGHT)); in computeSafeInsets() 81 int bottomInset = Math.max(cutout.getWaterfallInsets().bottom, in computeSafeInsets() 82 findCutoutInsetForSide(displaySize, cutout.getBoundingRectBottom(), in computeSafeInsets()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | StatusBarWindowView.java | 126 DisplayCutout cutout, Pair<Integer, Integer> cornerCutoutPadding, in paddingNeededForCutoutAndRoundedCorner() argument 128 if (cutout == null) { in paddingNeededForCutoutAndRoundedCorner() 133 int leftCornerCutoutPadding = cutout.getSafeInsetLeft(); in paddingNeededForCutoutAndRoundedCorner() 134 int rightCornerCutoutPadding = cutout.getSafeInsetRight(); in paddingNeededForCutoutAndRoundedCorner() 150 public static Pair<Integer, Integer> cornerCutoutMargins(DisplayCutout cutout, in cornerCutoutMargins() argument 152 return statusBarCornerCutoutMargins(cutout, display, RotationUtils.ROTATION_NONE, 0); in cornerCutoutMargins() 158 public static Pair<Integer, Integer> statusBarCornerCutoutMargins(DisplayCutout cutout, in statusBarCornerCutoutMargins() argument 160 if (cutout == null) { in statusBarCornerCutoutMargins() 169 boundsFromDirection(cutout, Gravity.LEFT, bounds); in statusBarCornerCutoutMargins() 172 boundsFromDirection(cutout, Gravity.RIGHT, bounds); in statusBarCornerCutoutMargins() [all …]
|
D | StatusBarTouchableRegionManager.java | 232 DisplayCutout cutout = windowInsets.getDisplayCutout(); in updateRegionForNotch() local 233 if (cutout == null) { in updateRegionForNotch() 240 ScreenDecorations.DisplayCutoutView.boundsFromDirection(cutout, Gravity.TOP, bounds); in updateRegionForNotch()
|
D | StatusBarContentInsetsProvider.kt | 156 val dc = context.display.cutout in <lambda>()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/ |
D | DisplayLayout.java | 351 DisplayCutout cutout, int rotation, int displayWidth, int displayHeight) { in calculateDisplayCutoutForRotation() argument 352 if (cutout == null || cutout == DisplayCutout.NO_CUTOUT) { in calculateDisplayCutoutForRotation() 356 return computeSafeInsets(cutout, displayWidth, displayHeight); in calculateDisplayCutoutForRotation() 358 final Insets waterfallInsets = rotateInsets(cutout.getWaterfallInsets(), rotation); in calculateDisplayCutoutForRotation() 360 Rect[] cutoutRects = cutout.getBoundingRectsAll(); in calculateDisplayCutoutForRotation() 370 final DisplayCutout.CutoutPathParserInfo info = cutout.getCutoutPathParserInfo(); in calculateDisplayCutoutForRotation() 399 Size displaySize, DisplayCutout cutout) { in computeSafeInsets() argument 402 + " cutout=" + cutout); in computeSafeInsets() 405 int leftInset = Math.max(cutout.getWaterfallInsets().left, in computeSafeInsets() 406 findCutoutInsetForSide(displaySize, cutout.getBoundingRectLeft(), Gravity.LEFT)); in computeSafeInsets() [all …]
|
/frameworks/base/core/java/android/view/ |
D | DisplayCutout.java | 967 final DisplayCutout cutout = new DisplayCutout( in pathAndDisplayCutoutFromSpec() local 970 final Pair<Path, DisplayCutout> result = new Pair<>(cutoutSpec.getPath(), cutout); in pathAndDisplayCutoutFromSpec() 1005 public ParcelableWrapper(DisplayCutout cutout) { in ParcelableWrapper() argument 1006 mInner = cutout; in ParcelableWrapper() 1024 public static void writeCutoutToParcel(DisplayCutout cutout, Parcel out, int flags) { in writeCutoutToParcel() argument 1025 if (cutout == null) { in writeCutoutToParcel() 1027 } else if (cutout == NO_CUTOUT) { in writeCutoutToParcel() 1031 out.writeTypedObject(cutout.mSafeInsets, flags); in writeCutoutToParcel() 1032 out.writeTypedArray(cutout.mBounds.getRects(), flags); in writeCutoutToParcel() 1033 out.writeTypedObject(cutout.mWaterfallInsets, flags); in writeCutoutToParcel() [all …]
|
D | DisplayAdjustments.java | 222 DisplayCutout cutout) { in FixedRotationAdjustments() argument 226 mRotatedDisplayCutout = cutout; in FixedRotationAdjustments()
|
D | InsetsState.java | 477 public void setDisplayCutout(DisplayCutout cutout) { in setDisplayCutout() argument 478 mDisplayCutout.set(cutout); in setDisplayCutout()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | DisplayPolicyTestsBase.java | 120 WmDisplayCutout cutout = WmDisplayCutout.NO_CUTOUT; in displayInfoAndCutoutForRotation() local 127 cutout = WmDisplayCutout.computeSafeInsets( in displayInfoAndCutoutForRotation() 130 info.displayCutout = cutout.getDisplayCutout(); in displayInfoAndCutoutForRotation() 134 return Pair.create(info, cutout); in displayInfoAndCutoutForRotation()
|
D | WallpaperControllerTests.java | 154 final WmDisplayCutout cutout = dc.calculateDisplayCutoutForRotation(Surface.ROTATION_0); in testWallpaperSizeWithFixedTransform() local 156 info, cutout, RoundedCorners.NO_ROUNDED_CORNERS, new PrivacyIndicatorBounds()); in testWallpaperSizeWithFixedTransform()
|
D | DisplayContentTests.java | 719 final DisplayCutout cutout = new WmDisplayCutout( in testDisplayCutout_rot0() local 723 dc.mInitialDisplayCutout = cutout; in testDisplayCutout_rot0() 727 assertEquals(cutout, dc.getDisplayInfo().displayCutout); in testDisplayCutout_rot0() 759 final DisplayCutout cutout = new WmDisplayCutout( in testDisplayCutout_rot90() local 763 dc.mInitialDisplayCutout = cutout; in testDisplayCutout_rot90()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/ |
D | QuickStatusBarHeader.java | 389 DisplayCutout cutout = insets.getDisplayCutout(); in onApplyWindowInsets() local 391 cutout, getDisplay()); in onApplyWindowInsets() 394 cutout, cornerCutoutPadding, -1); in onApplyWindowInsets() 403 if (cutout != null) { in onApplyWindowInsets() 404 Rect topCutout = cutout.getBoundingRectTop(); in onApplyWindowInsets() 425 mWaterfallTopInset = cutout == null ? 0 : cutout.getWaterfallInsets().top; in onApplyWindowInsets()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/hidedisplaycutout/ |
D | HideDisplayCutoutOrganizer.java | 196 DisplayCutout cutout = display.getCutout(); in getDisplayCutoutInsetsOfNaturalOrientation() local 197 Insets insets = cutout != null ? Insets.of(cutout.getSafeInsets()) : Insets.NONE; in getDisplayCutoutInsetsOfNaturalOrientation()
|
/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/screenshot/ |
D | ScreenshotView.java | 417 void updateDisplayCutoutMargins(DisplayCutout cutout) { in updateDisplayCutoutMargins() argument 422 if (cutout == null) { in updateDisplayCutoutMargins() 425 Insets waterfall = cutout.getWaterfallInsets(); in updateDisplayCutoutMargins() 427 p.setMargins(waterfall.left, Math.max(cutout.getSafeInsetTop(), waterfall.top), in updateDisplayCutoutMargins() 428 waterfall.right, Math.max(cutout.getSafeInsetBottom(), waterfall.bottom)); in updateDisplayCutoutMargins() 430 p.setMargins(Math.max(cutout.getSafeInsetLeft(), waterfall.left), waterfall.top, in updateDisplayCutoutMargins() 431 Math.max(cutout.getSafeInsetRight(), waterfall.right), waterfall.bottom); in updateDisplayCutoutMargins() 439 void updateOrientation(DisplayCutout cutout) { in updateOrientation() argument 442 updateDisplayCutoutMargins(cutout); in updateOrientation()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
D | ScreenDecorations.java | 301 final DisplayCutout cutout = getCutout(); in setupDecorations() local 302 final Rect[] bounds = cutout == null ? null : cutout.getBoundingRectsAll(); in setupDecorations() 780 DisplayCutout cutout = getCutout(); in shouldShowRoundedCorner() local 782 final boolean emptyBoundsOrWaterfall = cutout == null || cutout.isBoundsEmpty(); in shouldShowRoundedCorner() 787 if (emptyBoundsOrWaterfall || !cutout.getBoundingRectsAll()[rotatedTop].isEmpty() in shouldShowRoundedCorner() 788 || !cutout.getBoundingRectsAll()[rotatedBottom].isEmpty()) { in shouldShowRoundedCorner()
|
/frameworks/base/core/proto/android/server/ |
D | windowmanagerservice.proto | 404 optional .android.view.DisplayCutoutProto cutout = 33 [deprecated=true]; field 520 optional .android.view.DisplayCutoutProto cutout = 10 [deprecated=true]; field
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ |
D | NotificationStackScrollLayout.java | 1649 final DisplayCutout cutout = insets.getDisplayCutout(); 1650 if (cutout != null) { 1651 mWaterfallTopInset = cutout.getWaterfallInsets().top;
|