/cts/tests/framework/base/windowmanager/src/android/server/wm/insets/ |
D | WindowInsetsTest.java | 17 package android.server.wm.insets; 98 final WindowInsets insets = in testBuilder() local 119 assertEquals(Insets.of(1, 2, 3, 4), insets.getSystemWindowInsets()); in testBuilder() 120 assertEquals(Insets.of(5, 6, 7, 8), insets.getStableInsets()); in testBuilder() 121 assertEquals(Insets.of(9, 10, 11, 12), insets.getSystemGestureInsets()); in testBuilder() 122 assertEquals(Insets.of(13, 14, 15, 16), insets.getMandatorySystemGestureInsets()); in testBuilder() 123 assertEquals(Insets.of(17, 18, 19, 20), insets.getTappableElementInsets()); in testBuilder() 124 assertSame(CUTOUT, insets.getDisplayCutout()); in testBuilder() 125 assertEquals(getCutoutSafeInsets(insets), insets.getInsets(Type.displayCutout())); in testBuilder() 127 ROUNDED_CORNER_TOP_LEFT, insets.getRoundedCorner(RoundedCorner.POSITION_TOP_LEFT)); in testBuilder() [all …]
|
D | WindowInsetsPolicyTest.java | 17 package android.server.wm.insets; 110 WindowInsets insets = getOnMainSync(activity::getDispatchedInsets); in testWindowInsets_dispatched() local 111 Assert.assertThat("test setup failed, no insets dispatched", insets, notNullValue()); in testWindowInsets_dispatched() 113 commonAsserts(insets); in testWindowInsets_dispatched() 120 WindowInsets insets = getOnMainSync(activity::getRootInsets); in testWindowInsets_root() local 121 Assert.assertThat("test setup failed, no insets at root", insets, notNullValue()); in testWindowInsets_root() 123 commonAsserts(insets); in testWindowInsets_root() 156 WindowInsets insets = getOnMainSync(activity::getDispatchedInsets); in testForcedConsumedTopInsets() local 159 rootInsets.getSystemWindowInsetTop(), insets.getSystemWindowInsetTop()); in testForcedConsumedTopInsets() 163 insets = getOnMainSync(fullscreenActivity::getDispatchedInsets); in testForcedConsumedTopInsets() [all …]
|
D | DisplayCutoutTests.java | 17 package android.server.wm.insets; 25 import static android.server.wm.insets.DisplayCutoutTests.TestActivity.EXTRA_CUTOUT_MODE; 26 import static android.server.wm.insets.DisplayCutoutTests.TestActivity.EXTRA_ORIENTATION; 27 import static android.server.wm.insets.DisplayCutoutTests.TestDef.Which.DISPATCHED; 28 import static android.server.wm.insets.DisplayCutoutTests.TestDef.Which.ROOT; 284 (activity, insets, displayCutout, which) -> { in testDisplayCutout_default() 291 insetsLessThanOrEqualTo(stableInsets(insets))); in testDisplayCutout_default() 302 runTest(LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES, (a, insets, cutout, which) -> { in testDisplayCutout_shortEdges() 328 runTest(LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER, (a, insets, displayCutout, which) -> { in testDisplayCutout_never() 336 runTest(LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS, (a, insets, displayCutout, which) -> { in testDisplayCutout_always() [all …]
|
D | DecorInsetTestsBase.java | 17 package android.server.wm.insets; 138 private static void insetRect(Rect rect, Insets insets) { in insetRect() argument 139 rect.left += insets.left; in insetRect() 140 rect.top += insets.top; in insetRect() 141 rect.right -= insets.right; in insetRect() 142 rect.bottom -= insets.bottom; in insetRect()
|
D | WindowInsetsAnimationSynchronicityTests.java | 17 package android.server.wm.insets; 42 import android.server.wm.insets.WindowInsetsAnimationControllerTests.LimitedErrorCollector; 222 public WindowInsets onProgress(@NonNull WindowInsets insets, 225 mAnimationInsets = insets; 263 public WindowInsets onApplyWindowInsets(WindowInsets insets) { in onApplyWindowInsets() argument 264 mLayoutInsets = insets; in onApplyWindowInsets() 276 Insets insets = getEffectiveInsets().getInsets(ime()); in onDraw() local 277 insetRect(mTmpRect, insets); in onDraw() 287 private static void insetRect(Rect rect, Insets insets) { in insetRect() argument 288 rect.left += insets.left; in insetRect() [all …]
|
D | WindowInsetsLayoutTests.java | 17 package android.server.wm.insets; 89 final Insets insets = windowInsets.getInsets(types); in testSetFitInsetsTypesInner() local 90 assertEquals(Insets.NONE, insets); in testSetFitInsetsTypesInner() 127 final Insets insets = windowInsets.getInsets(types); in testSetFitInsetsSidesInner() local 129 assertEquals(0, insets.left); in testSetFitInsetsSidesInner() 132 assertEquals(0, insets.top); in testSetFitInsetsSidesInner() 135 assertEquals(0, insets.right); in testSetFitInsetsSidesInner() 138 assertEquals(0, insets.bottom); in testSetFitInsetsSidesInner()
|
D | WindowInsetsAnimationTests.java | 17 package android.server.wm.insets; 182 callback.navAnimSteps.get(0).insets.getInsets(navigationBars())); in testAnimationCallbacks_overlapping() 187 .insets in testAnimationCallbacks_overlapping() 192 callback.statusAnimSteps.get(0).insets.getInsets(statusBars())); in testAnimationCallbacks_overlapping() 197 .insets in testAnimationCallbacks_overlapping() 253 WindowInsets insets, List<WindowInsetsAnimation> runningAnimations) { in testAnimationCallbacks_childInsetting() 254 return insets.inset(insets.getInsets(navigationBars())); in testAnimationCallbacks_childInsetting() 285 argThat(insets -> NONE.equals(insets.getInsets(navigationBars()))), in testAnimationCallbacks_childInsetting()
|
D | WindowInsetsControllerTests.java | 17 package android.server.wm.insets; 284 final WindowInsets insets = rootView.getRootWindowInsets(); in testImeForceShowingNavigationBar() 285 final boolean imeVisible = insets.isVisible(ime()); in testImeForceShowingNavigationBar() 286 final boolean navVisible = insets.isVisible(navigationBars()); in testImeForceShowingNavigationBar() 357 final Insets insets = rootView.getRootWindowInsets().getInsets(types); in testSetSystemBarsBehavior_default() local 372 swipeFromEdgeOfScreen(insets, rootView); in testSetSystemBarsBehavior_default() 550 final Insets insets = rootView.getRootWindowInsets().getInsets(types); in testSetSystemUiVisibilityAfterCleared_showBarsBySwipe() local 570 swipeFromEdgeOfScreen(insets, rootView); in testSetSystemUiVisibilityAfterCleared_showBarsBySwipe() 591 swipeFromEdgeOfScreen(insets, rootView); in testSetSystemUiVisibilityAfterCleared_showBarsBySwipe() 760 dialogWindow.getDecorView().setOnApplyWindowInsetsListener((view, insets) -> { in testInsetsDispatch() [all …]
|
/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() 141 public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) { in onApplyWindowInsets() argument 142 if (insets != null) { in onApplyWindowInsets() 144 mContentWindowInsets = new WindowInsets.Builder(insets).build(); in onApplyWindowInsets() 146 mDecorViewWindowInsets = new WindowInsets.Builder(insets).build(); in onApplyWindowInsets() 152 return insets; in onApplyWindowInsets() 262 public Rect getActionBounds(Insets insets, WindowInsets windowInsets) { in getActionBounds() argument 263 return calculateBoundsWithInsets(insets, windowInsets, mContentBoundOnScreen); in getActionBounds() [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/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | GestureNavSwitchHelper.java | 79 private void insetsToRect(Insets insets, Rect outRect) { in insetsToRect() argument 80 outRect.set(insets.left, insets.top, insets.right, insets.bottom); in insetsToRect() 127 WindowInsets insets = mWindowManager.getCurrentWindowMetrics().getWindowInsets(); in getCurrentInsetsSize() local 128 Insets navInsets = insets.getInsetsIgnoringVisibility( in getCurrentInsetsSize()
|
/cts/tests/surfacecontrol/surfacevalidator/src/android/view/cts/surfacevalidator/ |
D | BitmapPixelChecker.java | 88 private void applyInsetsToLogBounds(Insets insets) { in applyInsetsToLogBounds() argument 90 mBoundToLog.inset(insets); in applyInsetsToLogBounds() 101 BitmapPixelChecker pixelChecker, float expectedMatchRatio, Insets insets) { in validateScreenshot() argument 103 Rect bounds = getBounds(swBitmap, insets); in validateScreenshot() 104 pixelChecker.applyInsetsToLogBounds(insets); in validateScreenshot() 123 BitmapPixelChecker pixelChecker, int expectedMatchingPixels, Insets insets) { in validateScreenshot() argument 125 Rect bounds = getBounds(swBitmap, insets); in validateScreenshot() 126 pixelChecker.applyInsetsToLogBounds(insets); in validateScreenshot() 144 private static Rect getBounds(Bitmap swBitmap, Insets insets) { in getBounds() argument 150 bounds.inset(insets); in getBounds()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/other/ |
D | EnsureBarContrastTest.java | 290 final WindowInsets insets = getWindow().getDecorView().getRootWindowInsets(); 292 return bar.getInset(insets.getTappableElementInsets()) 293 < bar.getInset(insets.getSystemWindowInsets()); 298 final Insets insets = dv.getRootWindowInsets().getSystemWindowInsets(); 300 Rect r = bar.getLocation(insets, 316 int getInset(Insets insets) { 317 return insets.top; 321 Rect getLocation(Insets insets, Rect screen) { 323 r.bottom = r.top + getInset(insets); 335 int getInset(Insets insets) { [all …]
|
D | PrivacyIndicatorBoundsTests.java | 105 WindowInsets insets = activity.getDispatchedInsets(); in testStaticBoundsAreNotNull() local 106 assertNotNull(insets); in testStaticBoundsAreNotNull() 109 Rect bounds = insets.getPrivacyIndicatorBounds(); in testStaticBoundsAreNotNull() 165 (v, insets) -> { in addChildWindow() argument 166 mDispatchedInsets = insets; in addChildWindow() 167 return insets; in addChildWindow()
|
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/ |
D | WindowInsetsAnimationTestBase.java | 112 assertEquals(before, steps.get(0).insets); in assertBeforeAfterState() 113 assertEquals(after, steps.get(steps.size() - 1).insets); in assertBeforeAfterState() 141 assertListElements(steps, step -> step.insets, compareInsets(types, showAnimation)); in assertAnimationSteps() 183 AnimationStep(WindowInsets insets, float fraction, float interpolatedFraction, in AnimationStep() argument 185 this.insets = insets; in AnimationStep() 191 public WindowInsets insets; field in WindowInsetsAnimationTestBase.AnimCallback.AnimationStep 218 public WindowInsets onProgress(WindowInsets insets, in onProgress() argument 220 animationSteps.add(new AnimationStep(insets, lastAnimation.getFraction(), in onProgress() 275 public WindowInsets onProgress(WindowInsets insets, in onProgress() argument 278 statusAnimSteps.add(new AnimationStep(insets, statusBarAnim.getFraction(), in onProgress() [all …]
|
D | BarTestUtils.java | 104 final WindowInsets[] insets = new WindowInsets[1]; in getInsets() local 107 insets[0] = rule.getActivity().getWindow().getDecorView().getRootWindowInsets(); in getInsets() 112 return insets[0]; in getInsets()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/animations/ |
D | DialogFrameTests.java | 299 final Insets insets = in getActivitySystemInsets() local 308 Insets.of(insets.left, insets.top, insets.right, insets.bottom); in getActivitySystemInsets() 313 private static Rect inset(Rect original, Insets insets) { in inset() argument 314 final int left = original.left + insets.left; in inset() 315 final int top = original.top + insets.top; in inset() 316 final int right = original.right - insets.right; in inset() 317 final int bottom = original.bottom - insets.bottom; in inset()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/activity/ |
D | CloseOnOutsideTestActivity.java | 47 Insets insets = windowMetrics.getWindowInsets().getInsets(WindowInsets.Type.systemBars()); in setupWindowSize() local 53 params.x = insets.left + (width / 4); in setupWindowSize() 54 params.y = insets.top + (height / 4); in setupWindowSize()
|
/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/tests/input/src/android/input/cts/ |
D | TwoWindowsActivity.kt | 64 val insets = windowMetrics.windowInsets.getInsetsIgnoringVisibility( in launchTwoWindows() constant 67 val width = windowMetrics.bounds.width() - insets.left - insets.right in launchTwoWindows() 68 val height = windowMetrics.bounds.height() - insets.top - insets.bottom in launchTwoWindows()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/window/ |
D | WindowCtsActivity.java | 43 getContentView().setOnApplyWindowInsetsListener((v, insets) -> { in onCreate() 44 mLastInsets = insets; in onCreate() 45 return insets; in onCreate()
|
D | WindowPolicyTests.java | 184 final Insets insets = windowInsets.getInsets( in testOptOutEdgeToEdgeAppBounds() local 188 expectedBounds.inset(insets); in testOptOutEdgeToEdgeAppBounds() 204 final Insets insets = windowInsets.getInsets( in testOptOutEdgeToEdgeDisplayMetrics() local 208 expectedBounds.inset(insets); in testOptOutEdgeToEdgeDisplayMetrics() 297 public WindowInsets onApplyWindowInsets(WindowInsets insets) { in onApplyWindowInsets() argument 298 mWindowInsets = insets; in onApplyWindowInsets() 299 return super.onApplyWindowInsets(insets); in onApplyWindowInsets()
|
/cts/hostsidetests/inputmethodservice/deviceside/devicetest/src/android/inputmethodservice/cts/devicetest/ |
D | TestActivity.java | 64 getWindow().getDecorView().setOnApplyWindowInsetsListener((v, insets) -> { in onCreate() 65 final var i = insets.getInsets(systemBars() | displayCutout()); in onCreate() 67 return insets; in onCreate()
|
/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()
|