/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 | 173 DisplayCutout cutout = in testGetWaterfallInsets() local 175 assertEquals(Insets.of(5, 6, 7, 8), cutout.getWaterfallInsets()); in testGetWaterfallInsets() 184 final DisplayCutout cutout = fromSpec(cutoutSpecString, displayWidth, displayHeight, in testGetCutoutPath() local 186 assertThat(cutout.getCutoutPath(), notNullValue()); in testGetCutoutPath() 220 final DisplayCutout cutout = fromSpec(cutoutSpecString, displayWidth, displayHeight, in testGetCutoutPathParserInfo() local 222 assertThat(displayWidth, equalTo(cutout.getCutoutPathParserInfo().getDisplayWidth())); in testGetCutoutPathParserInfo() 223 assertThat(displayHeight, equalTo(cutout.getCutoutPathParserInfo().getDisplayHeight())); in testGetCutoutPathParserInfo() 224 assertThat(density, equalTo(cutout.getCutoutPathParserInfo().getDensity())); in testGetCutoutPathParserInfo() 226 equalTo(cutout.getCutoutPathParserInfo().getCutoutSpec())); in testGetCutoutPathParserInfo() 227 assertThat(0, equalTo(cutout.getCutoutPathParserInfo().getRotation())); in testGetCutoutPathParserInfo() [all …]
|
D | InsetsStateTest.java | 634 DisplayCutout cutout = mState.calculateInsets(new Rect(1, 1, 199, 300), null, false, in testCalculateRelativeCutout() local 637 assertEquals(0, cutout.getSafeInsetLeft()); in testCalculateRelativeCutout() 638 assertEquals(1, cutout.getSafeInsetTop()); in testCalculateRelativeCutout() 639 assertEquals(2, cutout.getSafeInsetRight()); in testCalculateRelativeCutout() 640 assertEquals(4, cutout.getSafeInsetBottom()); in testCalculateRelativeCutout() 642 cutout.getBoundingRectLeft()); in testCalculateRelativeCutout() 644 cutout.getBoundingRectTop()); in testCalculateRelativeCutout() 646 cutout.getBoundingRectRight()); in testCalculateRelativeCutout() 648 cutout.getBoundingRectBottom()); in testCalculateRelativeCutout()
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | SystemBarUtils.java | 46 public static int getStatusBarHeight(Resources res, DisplayCutout cutout) { in getStatusBarHeight() argument 48 final int safeInsetTop = cutout == null ? 0 : cutout.getSafeInsetTop(); in getStatusBarHeight() 49 final int waterfallInsetTop = cutout == null ? 0 : cutout.getWaterfallInsets().top; in getStatusBarHeight() 62 final DisplayCutout cutout = display.getCutout(); in getStatusBarHeightForRotation() local 67 if (cutout == null) { in getStatusBarHeightForRotation() 72 cutout.getRotated(info.logicalWidth, info.logicalHeight, rotation, targetRot); in getStatusBarHeightForRotation()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ui/ |
D | SystemBarUtilsProxy.kt | 44 val cutout = context.display.cutout in getStatusBarHeight() constant 45 val waterfallInsetTop = if (cutout == null) 0 else cutout.waterfallInsets.top in getStatusBarHeight()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
D | ScreenDecorHwcLayer.kt | 210 cutout -> in <lambda>() method 211 if (!cutout.boundingRectLeft.isEmpty) { in <lambda>() 213 cutout.boundingRectLeft.right.coerceAtLeast(transparentRect.left) in <lambda>() 215 if (!cutout.boundingRectTop.isEmpty) { in <lambda>() 217 cutout.boundingRectTop.bottom.coerceAtLeast(transparentRect.top) in <lambda>() 219 if (!cutout.boundingRectRight.isEmpty) { in <lambda>() 221 cutout.boundingRectRight.left.coerceAtMost(transparentRect.right) in <lambda>() 223 if (!cutout.boundingRectBottom.isEmpty) { in <lambda>() 225 cutout.boundingRectBottom.top.coerceAtMost(transparentRect.bottom) in <lambda>() 273 cutout -> in <lambda>() method [all …]
|
D | SysUICutoutInformation.kt | 22 val cutout: DisplayCutout, constant in com.android.systemui.SysUICutoutInformation
|
D | SysUICutoutProvider.kt | 48 val displayCutout: DisplayCutout = display.cutout ?: return null in cutoutInfoForCurrentDisplayAndRotation()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/shade/ |
D | QsBatteryModeController.kt | 44 fun getBatteryMode(cutout: DisplayCutout?, qsExpandedFraction: Float): Int? = in getBatteryMode() 48 if (hasCenterCutout(cutout)) { in getBatteryMode() 65 private fun hasCenterCutout(cutout: DisplayCutout?): Boolean = in hasCenterCutout() 66 cutout?.let { in hasCenterCutout()
|
D | ShadeHeaderController.kt | 144 private var cutout: DisplayCutout? = null in <lambda>() variable in com.android.systemui.shade.ShadeHeaderController 413 val cutout = insets.displayCutout.also { this.cutout = it } in <lambda>() constant 430 if (cutout != null) { in <lambda>() 431 val topCutout = cutout.boundingRectTop in <lambda>() 453 qsBatteryModeController.getBatteryMode(cutout, qsExpandedFraction)?.let { in <lambda>()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/ui/ |
D | ScreenshotShelfView.kt | 128 val cutout = insets.displayCutout in <lambda>() constant 142 if (cutout == null) { in <lambda>() 145 val waterfall = cutout.waterfallInsets in <lambda>() 149 max(cutout.safeInsetTop, waterfall.top), in <lambda>() 153 cutout.safeInsetBottom + verticalPadding, in <lambda>() 160 max(cutout.safeInsetLeft, waterfall.left), in <lambda>() 162 max(cutout.safeInsetRight, waterfall.right), in <lambda>()
|
/frameworks/base/core/java/android/window/ |
D | WindowMetricsController.java | 163 DisplayCutout cutout = currentDisplayInfo.displayCutout; in getPossibleMaximumWindowMetrics() local 164 if (cutout != null && currentDisplayInfo.rotation != ROTATION_0) { in getPossibleMaximumWindowMetrics() 165 cutout = cutout.getRotated( in getPossibleMaximumWindowMetrics() 170 currentDisplayInfo.roundedCorners).setDisplayCutout(cutout).build(); in getPossibleMaximumWindowMetrics()
|
/frameworks/base/core/java/android/view/ |
D | DisplayCutout.java | 1282 final DisplayCutout cutout = new DisplayCutout(safeInsets, waterfallInsets, 1287 final Pair<Path, DisplayCutout> result = new Pair<>(cutoutSpec.getPath(), cutout); 1388 public static Rect computeSafeInsets(int displayW, int displayH, DisplayCutout cutout) { 1389 return computeSafeInsets(displayW, displayH, cutout.getWaterfallInsets(), 1390 cutout.getBoundingRectsAll()); 1439 public ParcelableWrapper(DisplayCutout cutout) { in ParcelableWrapper() argument 1440 mInner = cutout; in ParcelableWrapper() 1458 public static void writeCutoutToParcel(DisplayCutout cutout, Parcel out, int flags) { in writeCutoutToParcel() argument 1459 if (cutout == null) { in writeCutoutToParcel() 1461 } else if (cutout == NO_CUTOUT) { in writeCutoutToParcel() [all …]
|
D | WindowLayout.java | 104 final DisplayCutout cutout = state.getDisplayCutout(); in computeFrames() local 108 if (cutoutMode != LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS && !cutout.isEmpty()) { in computeFrames() 127 if (systemBarsInsets.left >= cutout.getSafeInsetLeft()) { in computeFrames() 130 if (systemBarsInsets.top >= cutout.getSafeInsetTop()) { in computeFrames() 133 if (systemBarsInsets.right >= cutout.getSafeInsetRight()) { in computeFrames() 136 if (systemBarsInsets.bottom >= cutout.getSafeInsetBottom()) { in computeFrames()
|
D | InsetsState.java | 474 public void setDisplayCutout(DisplayCutout cutout) { in setDisplayCutout() argument 475 mDisplayCutout.set(cutout); in setDisplayCutout() 485 final DisplayCutout cutout = mDisplayCutout.get(); in getDisplayCutoutSafe() local 487 if (!cutout.isEmpty()) { in getDisplayCutoutSafe() 488 if (cutout.getSafeInsetLeft() > 0) { in getDisplayCutoutSafe() 489 outBounds.left = displayFrame.left + cutout.getSafeInsetLeft(); in getDisplayCutoutSafe() 491 if (cutout.getSafeInsetTop() > 0) { in getDisplayCutoutSafe() 492 outBounds.top = displayFrame.top + cutout.getSafeInsetTop(); in getDisplayCutoutSafe() 494 if (cutout.getSafeInsetRight() > 0) { in getDisplayCutoutSafe() 495 outBounds.right = displayFrame.right - cutout.getSafeInsetRight(); in getDisplayCutoutSafe() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/ |
D | SysUICutoutProviderTest.kt | 43 val noCutoutDisplay = createDisplay(cutout = null) in cutoutInfoForCurrentDisplay_noCutout_returnsNull() 60 assertThat(sysUICutout.cutout).isEqualTo(cutoutDisplay.cutout) in cutoutInfoForCurrentDisplay_returnsCutout() 262 cutout: DisplayCutout? = mock<DisplayCutout>() in createDisplay() 278 whenever(this.cutout).thenReturn(cutout) in createDisplay()
|
D | DisplayCutoutBaseViewTest.kt | 55 private val cutout: DisplayCutout = DisplayCutout.Builder() constant in com.android.systemui.DisplayCutoutBaseViewTest 113 expect.op(cutout.boundingRectTop, Region.Op.UNION) in testGetInterceptRegion_hasCutout() 182 info.displayCutout = if (hasCutout) cutout else null in setupDisplayCutoutBaseView()
|
D | ScreenDecorHwcLayerTest.kt | 171 cutout: DisplayCutout?, in setupConfigs() 182 info.displayCutout = cutout in setupConfigs()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/ |
D | Utils.java | 137 final DisplayCutout cutout = context.getDisplay().getCutout(); in getStatusBarHeaderHeightKeyguard() local 138 final int waterfallInsetTop = cutout == null ? 0 : cutout.getWaterfallInsets().top; in getStatusBarHeaderHeightKeyguard()
|
/frameworks/base/packages/SystemUI/compose/features/src/com/android/systemui/common/ui/compose/windowinsets/ |
D | ScreenDecorProvider.kt | 48 val cutout by displayCutout.collectAsStateWithLifecycle() in ScreenDecorProvider() constant 65 LocalDisplayCutout provides cutout, in ScreenDecorProvider()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/widget/ |
D | ActionBarOverlayLayoutTest.java | 231 private WindowInsets insetsWith(Insets content, DisplayCutout cutout) { in insetsWith() argument 232 final Insets cutoutInsets = cutout != null in insetsWith() 233 ? Insets.of(cutout.getSafeInsets()) in insetsWith() 237 .setDisplayCutout(cutout) in insetsWith()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | StatusBarContentInsetsProvider.kt | 142 val cutout = checkNotNull(context.display).cutout ?: return false in <lambda>() constant 143 val topBounds = cutout.boundingRectTop in <lambda>() 189 val displayCutout = sysUICutout?.cutout in <lambda>() 231 val displayCutout = sysUICutout?.cutout in <lambda>() 513 val cutoutRects = sysUICutout?.cutout?.boundingRectsLeftRightTop in getStatusBarContentBounds()
|
D | StatusBarTouchableRegionManager.java | 262 DisplayCutout cutout = windowInsets.getDisplayCutout(); in updateRegionForNotch() local 263 if (cutout == null) { in updateRegionForNotch() 270 ScreenDecorations.DisplayCutoutView.boundsFromDirection(cutout, Gravity.TOP, bounds); in updateRegionForNotch()
|
/frameworks/base/core/java/android/window/flags/ |
D | large_screen_experiences_app_compat.aconfig | 17 description: "When necessary, configuration decoupled from status bar and display cutout" 25 description: "Make it possible to move cutout across edges through device config"
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | DisplayFrames.java | 63 public DisplayFrames(InsetsState insetsState, DisplayInfo info, DisplayCutout cutout, in DisplayFrames() argument 67 update(info.rotation, info.logicalWidth, info.logicalHeight, cutout, roundedCorners, in DisplayFrames()
|