Home
last modified time | relevance | path

Searched refs:cutout (Results 1 – 25 of 39) sorted by relevance

12

/frameworks/base/services/tests/wmtests/src/com/android/server/wm/utils/
DWmDisplayCutoutTest.java56 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/
DDisplayCutoutTest.java173 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 …]
DInsetsStateTest.java634 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/
DSystemBarUtils.java46 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/
DSystemBarUtilsProxy.kt44 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/
DScreenDecorHwcLayer.kt210 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 …]
DSysUICutoutInformation.kt22 val cutout: DisplayCutout, constant in com.android.systemui.SysUICutoutInformation
DSysUICutoutProvider.kt48 val displayCutout: DisplayCutout = display.cutout ?: return null in cutoutInfoForCurrentDisplayAndRotation()
/frameworks/base/packages/SystemUI/src/com/android/systemui/shade/
DQsBatteryModeController.kt44 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()
DShadeHeaderController.kt144 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/
DScreenshotShelfView.kt128 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/
DWindowMetricsController.java163 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/
DDisplayCutout.java1282 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 …]
DWindowLayout.java104 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()
DInsetsState.java474 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/
DSysUICutoutProviderTest.kt43 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()
DDisplayCutoutBaseViewTest.kt55 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()
DScreenDecorHwcLayerTest.kt171 cutout: DisplayCutout?, in setupConfigs()
182 info.displayCutout = cutout in setupConfigs()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DUtils.java137 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/
DScreenDecorProvider.kt48 val cutout by displayCutout.collectAsStateWithLifecycle() in ScreenDecorProvider() constant
65 LocalDisplayCutout provides cutout, in ScreenDecorProvider()
/frameworks/base/core/tests/coretests/src/com/android/internal/widget/
DActionBarOverlayLayoutTest.java231 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/
DStatusBarContentInsetsProvider.kt142 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()
DStatusBarTouchableRegionManager.java262 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/
Dlarge_screen_experiences_app_compat.aconfig17 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/
DDisplayFrames.java63 public DisplayFrames(InsetsState insetsState, DisplayInfo info, DisplayCutout cutout, in DisplayFrames() argument
67 update(info.rotation, info.logicalWidth, info.logicalHeight, cutout, roundedCorners, in DisplayFrames()

12