/cts/tests/framework/base/windowmanager/src/android/server/wm/ |
D | WindowInsetsTest.java | 60 final WindowInsets insets = new WindowInsets.Builder() in testBuilder() local 69 assertEquals(Insets.of(1, 2, 3, 4), insets.getSystemWindowInsets()); in testBuilder() 70 assertEquals(Insets.of(5, 6, 7, 8), insets.getStableInsets()); in testBuilder() 71 assertEquals(Insets.of(9, 10, 11, 12), insets.getSystemGestureInsets()); in testBuilder() 72 assertEquals(Insets.of(13, 14, 15, 16), insets.getMandatorySystemGestureInsets()); in testBuilder() 73 assertEquals(Insets.of(17, 18, 19, 20), insets.getTappableElementInsets()); in testBuilder() 74 assertSame(CUTOUT, insets.getDisplayCutout()); in testBuilder() 79 final WindowInsets insets = new WindowInsets.Builder() in testBuilder_copy() local 87 final WindowInsets copy = new WindowInsets.Builder(insets).build(); in testBuilder_copy() 89 assertEquals(insets, copy); in testBuilder_copy() [all …]
|
D | WindowInsetsPolicyTest.java | 98 WindowInsets insets = getOnMainSync(activity::getDispatchedInsets); in testWindowInsets_dispatched() local 99 Assert.assertThat("test setup failed, no insets dispatched", insets, notNullValue()); in testWindowInsets_dispatched() 101 commonAsserts(insets); in testWindowInsets_dispatched() 108 WindowInsets insets = getOnMainSync(activity::getRootInsets); in testWindowInsets_root() local 109 Assert.assertThat("test setup failed, no insets at root", insets, notNullValue()); in testWindowInsets_root() 111 commonAsserts(insets); in testWindowInsets_root() 143 WindowInsets insets = getOnMainSync(activity::getDispatchedInsets); in testForcedConsumedTopInsets() local 146 rootInsets.getSystemWindowInsetTop(), insets.getSystemWindowInsetTop()); in testForcedConsumedTopInsets() 150 insets = getOnMainSync(fullscreenActivity::getDispatchedInsets); in testForcedConsumedTopInsets() 152 0, insets.getSystemWindowInsetTop()); in testForcedConsumedTopInsets() [all …]
|
D | DisplayCutoutTests.java | 114 runTest(LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT, (activity, insets, displayCutout, which) -> { in testDisplayCutout_default_portrait() 120 safeInsets(displayCutout), insetsLessThanOrEqualTo(stableInsets(insets))); in testDisplayCutout_default_portrait() 135 runTest(LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES, (a, insets, displayCutout, which) -> { in testDisplayCutout_shortEdges_portrait() 145 runTest(LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER, (a, insets, displayCutout, which) -> { in testDisplayCutout_never_portrait() 154 WindowInsets insets = getOnMainSync(activity::getRootInsets); in runTest() local 156 Assert.assertThat("test setup failed, no insets at root", insets, notNullValue()); in runTest() 160 final DisplayCutout displayCutout = insets.getDisplayCutout(); in runTest() 164 commonAsserts(activity, insets, displayCutout); in runTest() 167 test.run(activity, insets, displayCutout, ROOT); in runTest() 176 private void commonAsserts(TestActivity activity, WindowInsets insets, DisplayCutout cutout) { in commonAsserts() argument [all …]
|
D | EnsureBarContrastTest.java | 274 final WindowInsets insets = getWindow().getDecorView().getRootWindowInsets(); 276 return bar.getInset(insets.getTappableElementInsets()) 277 < bar.getInset(insets.getSystemWindowInsets()); 282 final Insets insets = dv.getRootWindowInsets().getSystemWindowInsets(); 284 Rect r = bar.getLocation(insets, 300 int getInset(Insets insets) { 301 return insets.top; 305 Rect getLocation(Insets insets, Rect screen) { 307 r.bottom = r.top + getInset(insets); 314 int getInset(Insets insets) { [all …]
|
D | WindowInputTests.java | 97 WindowInsets insets = mActivity.getWindow().getDecorView().getRootWindowInsets(); in testMoveWindowAndTap() local 98 final Rect windowBounds = new Rect(insets.getSystemWindowInsetLeft(), in testMoveWindowAndTap() 99 insets.getSystemWindowInsetTop(), in testMoveWindowAndTap() 100 displaySize.x - insets.getSystemWindowInsetRight(), in testMoveWindowAndTap() 101 displaySize.y - insets.getSystemWindowInsetBottom()); in testMoveWindowAndTap()
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | InsetsTest.java | 42 Insets insets = Insets.of(1, 2, 3, 4); in testInsetsAppliedInOrder() local 43 assertEquals(1, insets.left); in testInsetsAppliedInOrder() 44 assertEquals(2, insets.top); in testInsetsAppliedInOrder() 45 assertEquals(3, insets.right); in testInsetsAppliedInOrder() 46 assertEquals(4, insets.bottom); in testInsetsAppliedInOrder() 57 Insets insets = Insets.of(rect); in testInsetsFromRect() local 58 assertEquals(1, insets.left); in testInsetsFromRect() 59 assertEquals(2, insets.top); in testInsetsFromRect() 60 assertEquals(3, insets.right); in testInsetsFromRect() 61 assertEquals(4, insets.bottom); in testInsetsFromRect()
|
/cts/tests/tests/systemui/src/android/systemui/cts/ |
D | WindowInsetsActivity.java | 104 private void showVisualBoundary(WindowInsets insets) { in showVisualBoundary() argument 105 if (insets != null) { in showVisualBoundary() 108 presenterDrawable.setWindowInsets(insets); in showVisualBoundary() 134 public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) { in onApplyWindowInsets() argument 135 if (insets != null) { in onApplyWindowInsets() 137 mContentWindowInsets = new WindowInsets.Builder(insets).build(); in onApplyWindowInsets() 139 mDecorViewWindowInsets = new WindowInsets.Builder(insets).build(); in onApplyWindowInsets() 145 return insets; in onApplyWindowInsets() 252 public Rect getOperationArea(Insets insets, WindowInsets windowInsets) { in getOperationArea() argument 253 int left = insets.left; in getOperationArea() [all …]
|
D | WindowInsetsPresenterDrawable.java | 114 private void drawInset(Canvas canvas, Insets insets, Paint paint) { in drawInset() argument 117 if (insets.left > 0) { in drawInset() 118 canvas.drawRect(0, 0, insets.left, rect.bottom, paint); in drawInset() 120 if (insets.top > 0) { in drawInset() 121 canvas.drawRect(0, 0, rect.width(), insets.top, paint); in drawInset() 123 if (insets.right > 0) { in drawInset() 124 canvas.drawRect(rect.width() - insets.right, 0, rect.width(), rect.bottom, in drawInset() 127 if (insets.bottom > 0) { in drawInset() 128 canvas.drawRect(0, rect.height() - insets.bottom, rect.width(), rect.height(), in drawInset()
|
/cts/tests/tests/view/sdk28/src/android/view/cts/sdk28/ |
D | ViewGroupTest.java | 73 protected boolean fitSystemWindows(Rect insets) { in fitSystemWindows() argument 74 return super.fitSystemWindows(insets); in fitSystemWindows() 85 protected boolean fitSystemWindows(Rect insets) { in fitSystemWindows() argument
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/ |
D | BoxInsetLayout.java | 77 public WindowInsets onApplyWindowInsets(WindowInsets insets) { in onApplyWindowInsets() argument 78 insets = super.onApplyWindowInsets(insets); in onApplyWindowInsets() 79 final boolean round = insets.isRound(); in onApplyWindowInsets() 85 insets.getSystemWindowInsetLeft(), in onApplyWindowInsets() 86 insets.getSystemWindowInsetTop(), in onApplyWindowInsets() 87 insets.getSystemWindowInsetRight(), in onApplyWindowInsets() 88 insets.getSystemWindowInsetBottom()); in onApplyWindowInsets() 89 return insets; in onApplyWindowInsets()
|
/cts/tests/framework/base/windowmanager/app/src/android/server/wm/app/ |
D | BroadcastReceiverActivity.java | 69 view.setOnApplyWindowInsetsListener((v, insets) -> { in onCreate() argument 70 final boolean cutoutExists = (insets.getDisplayCutout() != null); in onCreate() 74 return insets; in onCreate()
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | MockIme.java | 450 public WindowInsets onApplyWindowInsets(WindowInsets insets) { in onApplyWindowInsets() argument 451 if (insets.isConsumed() in onApplyWindowInsets() 456 return insets; in onApplyWindowInsets() 464 != insets.getSystemWindowInsetBottom())) { in onApplyWindowInsets() 467 return insets; in onApplyWindowInsets() 470 final int possibleNavBarHeight = insets.getSystemWindowInsetBottom(); in onApplyWindowInsets() 473 ? insets in onApplyWindowInsets() 474 : insets.replaceSystemWindowInsets( in onApplyWindowInsets() 475 insets.getSystemWindowInsetLeft(), in onApplyWindowInsets() 476 insets.getSystemWindowInsetTop(), in onApplyWindowInsets() [all …]
|
/cts/tests/tests/view/src/android/view/cts/ |
D | ViewGroupTest.java | 2812 mMockViewGroup.setOnApplyWindowInsetsListener((v, insets) -> insets.inset(0, 0, 0, 10)); in testDispatchInsets_affectsChildren() 2817 WindowInsets insets = new WindowInsets.Builder().setSystemWindowInsets( in testDispatchInsets_affectsChildren() local 2819 mMockViewGroup.dispatchApplyWindowInsets(insets); in testDispatchInsets_affectsChildren() 2834 v1.setOnApplyWindowInsetsListener((v, insets) -> insets.inset(0, 0, 0, 10)); in testDispatchInsets_doesntAffectSiblings() 2839 WindowInsets insets = new WindowInsets.Builder().setSystemWindowInsets( in testDispatchInsets_doesntAffectSiblings() local 2841 mMockViewGroup.dispatchApplyWindowInsets(insets); in testDispatchInsets_doesntAffectSiblings() 2858 v11.setOnApplyWindowInsetsListener((v, insets) -> insets.inset(0, 0, 0, 10)); in testDispatchInsets_doesntAffectParentSiblings() 2863 WindowInsets insets = new WindowInsets.Builder().setSystemWindowInsets( in testDispatchInsets_doesntAffectParentSiblings() local 2865 mMockViewGroup.dispatchApplyWindowInsets(insets); in testDispatchInsets_doesntAffectParentSiblings() 2879 (v, insets) -> insets.consumeSystemWindowInsets()); in testDispatchInsets_consumeDoesntStopDispatch() [all …]
|
D | MockView.java | 399 protected boolean fitSystemWindows(Rect insets) { in fitSystemWindows() argument 400 return super.fitSystemWindows(insets); in fitSystemWindows()
|
D | ViewTest.java | 1774 Rect insets = new Rect(10, 20, 30, 50); in testFitSystemWindows() local 1777 assertFalse(view.fitSystemWindows(insets)); in testFitSystemWindows() 1781 assertFalse(view.fitSystemWindows(insets)); in testFitSystemWindows()
|
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | DrawableWrapperTest.java | 445 public void setInsets(@Nullable Insets insets) { in setInsets() argument 446 mInsets = insets; in setInsets()
|
D | DrawableContainerTest.java | 914 public void setInsets(@Nullable Insets insets) { in setInsets() argument 915 mInsets = insets; in setInsets()
|