Home
last modified time | relevance | path

Searched refs:bounds (Results 1 – 25 of 87) sorted by relevance

1234

/cts/tests/tests/gesture/src/android/gesture/cts/
DLineGestureStrokeHelper.java61 RectF bounds = new RectF(); in assertLineBoundingBox() local
62 linePath.computeBounds(bounds, true); in assertLineBoundingBox()
66 Assert.assertEquals(LINE_MIDWAY_POINT, bounds.bottom); in assertLineBoundingBox()
67 Assert.assertEquals(LINE_START_POINT, bounds.left); in assertLineBoundingBox()
68 Assert.assertEquals(LINE_MIDWAY_POINT, bounds.right); in assertLineBoundingBox()
69 Assert.assertEquals(LINE_START_POINT, bounds.top); in assertLineBoundingBox()
77 void assertLineBoundingBox(RectF bounds) { in assertLineBoundingBox() argument
80 Assert.assertEquals(LINE_END_POINT, bounds.bottom); in assertLineBoundingBox()
81 Assert.assertEquals(LINE_START_POINT, bounds.left); in assertLineBoundingBox()
82 Assert.assertEquals(LINE_END_POINT, bounds.right); in assertLineBoundingBox()
[all …]
DGestureStrokeTest.java94 RectF bounds = new RectF(); in testToPath_boundedLine() local
95 linePath.computeBounds(bounds, true); in testToPath_boundedLine()
98 assertEquals(LineGestureStrokeHelper.LINE_QUARTER_POINT, bounds.bottom); in testToPath_boundedLine()
99 assertEquals(LineGestureStrokeHelper.LINE_START_POINT, bounds.left); in testToPath_boundedLine()
100 assertEquals(LineGestureStrokeHelper.LINE_QUARTER_POINT, bounds.right); in testToPath_boundedLine()
101 assertEquals(LineGestureStrokeHelper.LINE_START_POINT, bounds.top); in testToPath_boundedLine()
/cts/tests/surfacecontrol/surfacevalidator/src/android/view/cts/surfacevalidator/
DBitmapPixelChecker.java59 public int getNumMatchingPixels(Bitmap bitmap, Rect bounds) { in getNumMatchingPixels() argument
60 Log.d(TAG, "Checking bounds " + bounds + " boundsToLog=" + mBoundToLog); in getNumMatchingPixels()
63 boundsToLog = new Rect(bounds); in getNumMatchingPixels()
68 for (int x = bounds.left; x < bounds.right; x++) { in getNumMatchingPixels()
69 for (int y = bounds.top; y < bounds.bottom; y++) { in getNumMatchingPixels()
103 Rect bounds = getBounds(swBitmap, insets); in validateScreenshot() local
105 int numMatchingPixels = pixelChecker.getNumMatchingPixels(swBitmap, bounds); in validateScreenshot()
106 float matchedRatio = ((float) numMatchingPixels) / (bounds.width() * bounds.height()); in validateScreenshot()
112 + matchedRatio + " of pixels in bitmap(" + bounds.width() + "," + bounds.height() in validateScreenshot()
125 Rect bounds = getBounds(swBitmap, insets); in validateScreenshot() local
[all …]
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/
DTouchHelper.java63 final Rect bounds = dc.getDisplayRect(); in touchAndCancelOnDisplayCenterSync() local
64 final int x = bounds.left + bounds.width() / 2; in touchAndCancelOnDisplayCenterSync()
65 final int y = bounds.top + bounds.height() / 2; in touchAndCancelOnDisplayCenterSync()
104 public void tapOnCenter(Rect bounds, int displayId) { in tapOnCenter() argument
105 tapOnCenter(bounds, displayId, true /* waitAnimation */); in tapOnCenter()
108 public void tapOnCenter(Rect bounds, int displayId, boolean waitAnimation) { in tapOnCenter() argument
109 final int tapX = bounds.left + bounds.width() / 2; in tapOnCenter()
110 final int tapY = bounds.top + bounds.height() / 2; in tapOnCenter()
131 final Rect bounds = mWmState.getDisplay(displayId).getDisplayRect(); in tapOnDisplayCenter() local
132 tapOnDisplaySync(bounds.centerX(), bounds.centerY(), displayId); in tapOnDisplayCenter()
[all …]
DCtsWindowInfoUtils.java288 && Rect.intersects(targetWindowInfo.bounds, windowInfo.bounds)) { in waitForWindowOnTop()
297 if (targetWindowInfo.bounds.equals(mPreviousBounds)) { in waitForWindowOnTop()
306 mPreviousBounds.set(targetWindowInfo.bounds); in waitForWindowOnTop()
413 currentBounds.put(windowInfo.windowToken, windowInfo.bounds); in waitForStableWindowGeometry()
467 Rect bounds = getWindowBoundsInDisplaySpace(windowTokenSupplier); in tapOnWindowCenter() local
468 if (bounds == null) { in tapOnWindowCenter()
472 final Point coord = new Point(bounds.left + bounds.width() / 2, in tapOnWindowCenter()
473 bounds.top + bounds.height() / 2); in tapOnWindowCenter()
497 Rect bounds = getWindowBoundsInDisplaySpace(windowTokenSupplier); in tapOnWindow() local
498 if (bounds == null) { in tapOnWindow()
[all …]
DTestTaskOrganizer.java92 final Rect bounds = context.createDisplayContext( in registerOrganizer() local
99 final boolean isLandscape = bounds.width() > bounds.height(); in registerOrganizer()
101 bounds.splitVertically(mPrimaryBounds, mSecondaryBounds); in registerOrganizer()
103 bounds.splitHorizontally(mPrimaryBounds, mSecondaryBounds); in registerOrganizer()
308 public void setRootPrimaryTaskBounds(Rect bounds) { in setRootPrimaryTaskBounds() argument
309 setTaskBounds(mRootPrimary.getToken(), bounds); in setRootPrimaryTaskBounds() local
312 void setRootSecondaryTaskBounds(Rect bounds) { in setRootSecondaryTaskBounds() argument
313 setTaskBounds(mRootSecondary.getToken(), bounds); in setRootSecondaryTaskBounds() local
324 private void setTaskBounds(WindowContainerToken container, Rect bounds) { in setTaskBounds() argument
328 .setBounds(container, bounds); in setTaskBounds()
[all …]
/cts/tests/surfacecontrol/src/android/view/surfacecontrol/cts/
DASurfaceControlInputReceiverTest.java134 Rect bounds = new Rect(); in testLocalASurfaceControlReceivesInput() local
135 assertWindowAndGetBounds(mActivity.getDisplayId(), bounds); in testLocalASurfaceControlReceivesInput() local
136 final Point tapCoord = new Point(bounds.left + bounds.width() / 2, in testLocalASurfaceControlReceivesInput()
137 bounds.top + bounds.height() / 2); in testLocalASurfaceControlReceivesInput()
140 assertMotionEventOnWindowCenter(motionEvents, bounds); in testLocalASurfaceControlReceivesInput()
186 Rect bounds = new Rect(); in testRemoteASurfaceControlReceivesInput() local
187 assertWindowAndGetBounds(mActivity.getDisplayId(), bounds); in testRemoteASurfaceControlReceivesInput() local
189 final Point coord = new Point(bounds.left + bounds.width() / 2, in testRemoteASurfaceControlReceivesInput()
190 bounds.top + bounds.height() / 2); in testRemoteASurfaceControlReceivesInput()
193 assertMotionEventOnWindowCenter(motionEvents, bounds); in testRemoteASurfaceControlReceivesInput()
[all …]
DSurfaceControlInputReceiverTests.java156 Rect bounds = getWindowBoundsInDisplaySpace(() -> clientToken); in testLocalSurfaceControlReceivesInput() local
157 Point centerCoordRelativeToWindow = new Point(bounds.width() / 2, in testLocalSurfaceControlReceivesInput()
158 bounds.height() / 2); in testLocalSurfaceControlReceivesInput()
220 Rect bounds = new Rect(); in testRemoteSurfaceControlReceivesInput() local
223 embeddedName, bounds)); in testRemoteSurfaceControlReceivesInput()
226 final Point tapCoord = new Point(bounds.left + bounds.width() / 2, in testRemoteSurfaceControlReceivesInput()
227 bounds.top + bounds.height() / 2); in testRemoteSurfaceControlReceivesInput()
230 final Point centerCoordRelativeToWindow = new Point(bounds.width() / 2, in testRemoteSurfaceControlReceivesInput()
231 bounds.height() / 2); in testRemoteSurfaceControlReceivesInput()
286 Rect bounds = getWindowBoundsInDisplaySpace(() -> clientToken); in testNonBatchedSurfaceControlReceivesInput() local
[all …]
/cts/tests/tests/renderscript/src/android/renderscript/cts/
Dfloat16_gen.c122 void getErrorBar(unsigned short value, int tolerance, unsigned short bounds[2]) { in getErrorBar()
135 bounds[0] = value; in getErrorBar()
136 bounds[1] = value; in getErrorBar()
170 bounds[0] = *(unsigned short *) &lb; in getErrorBar()
171 bounds[1] = *(unsigned short *) &ub; in getErrorBar()
175 if (!isFloat16Negative(bounds[0]) && isFloat16SubNormal(bounds[0])) in getErrorBar()
176 bounds[0] = 0x0; in getErrorBar()
178 if (isFloat16Negative(bounds[1]) && isFloat16SubNormal(bounds[1])) in getErrorBar()
179 bounds[1] = 0x0 | SIGN_MASK; in getErrorBar()
/cts/tests/app/app/src/android/app/stubs/
DOrientationTestUtils.java62 final Rect bounds = activity.getWindowManager().getCurrentWindowMetrics().getBounds(); in getOrientations() local
63 final int originalOrientation = bounds.width() > bounds.height() in getOrientations()
83 final Rect bounds = activity.getWindowManager().getCurrentWindowMetrics().getBounds(); in isCloseToSquareBounds() local
84 final int w = bounds.width(); in isCloseToSquareBounds()
85 final int h = bounds.height(); in isCloseToSquareBounds()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DScaleDrawableTest.java349 Rect bounds = new Rect(2, 2, 26, 32); in testOnBoundsChange() local
350 mockDrawable.setBounds(bounds); in testOnBoundsChange()
351 mockScaleDrawable.onBoundsChange(bounds); in testOnBoundsChange()
353 Gravity.apply(Gravity.LEFT, bounds.width() - (int) (bounds.width() * scaleWidth), in testOnBoundsChange()
354 bounds.height() - (int) (bounds.height() * scaleHeight), bounds, expected); in testOnBoundsChange()
365 mockDrawable.setBounds(bounds); in testOnBoundsChange()
367 mockScaleDrawable.onBoundsChange(bounds); in testOnBoundsChange()
369 bounds.width() - (int) (bounds.width() * scaleWidth * (10000 - level) / 10000), in testOnBoundsChange()
370 bounds.height() - (int) (bounds.height() * scaleHeight * (10000 - level) / 10000), in testOnBoundsChange()
371 bounds, expected); in testOnBoundsChange()
[all …]
DInsetDrawableTest.java287 Rect bounds = mPassDrawable.getBounds(); in testOnBoundsChange_dimension() local
288 assertEquals(0, bounds.left); in testOnBoundsChange_dimension()
289 assertEquals(0, bounds.top); in testOnBoundsChange_dimension()
290 assertEquals(0, bounds.right); in testOnBoundsChange_dimension()
291 assertEquals(0, bounds.bottom); in testOnBoundsChange_dimension()
296 assertEquals(5, bounds.left); in testOnBoundsChange_dimension()
297 assertEquals(5, bounds.top); in testOnBoundsChange_dimension()
298 assertEquals(-5, bounds.right); in testOnBoundsChange_dimension()
299 assertEquals(-5, bounds.bottom); in testOnBoundsChange_dimension()
308 Rect bounds = mPassDrawable.getBounds(); in testOnBoundsChange_fraction() local
[all …]
DAdaptiveIconMaskTest.java83 RectF bounds = new RectF(); in testDeviceConfigMask_bounds() local
84 mMask.computeBounds(bounds, true); in testDeviceConfigMask_bounds()
85 assertTrue("Mask top should be larger than or equal to 0", -DELTA <= bounds.top); in testDeviceConfigMask_bounds()
86 assertTrue("Mask left should be larger than or equal to 0", -DELTA <= bounds.left); in testDeviceConfigMask_bounds()
89 AdaptiveIconDrawable.MASK_SIZE + DELTA >= bounds.bottom); in testDeviceConfigMask_bounds()
92 AdaptiveIconDrawable.MASK_SIZE + DELTA >= bounds.right); in testDeviceConfigMask_bounds()
DDrawableWrapperTest.java345 Rect bounds = new Rect(2, 2, 26, 32); in testOnBoundsChange() local
346 mockDrawable.setBounds(bounds); in testOnBoundsChange()
347 mockDrawableWrapper.onBoundsChange(bounds); in testOnBoundsChange()
350 mockDrawable.setBounds(bounds); in testOnBoundsChange()
351 mockDrawableWrapper.onBoundsChange(bounds); in testOnBoundsChange()
352 assertEquals(bounds.left, mockDrawable.getBounds().left); in testOnBoundsChange()
353 assertEquals(bounds.top, mockDrawable.getBounds().top); in testOnBoundsChange()
354 assertEquals(bounds.right, mockDrawable.getBounds().right); in testOnBoundsChange()
355 assertEquals(bounds.bottom, mockDrawable.getBounds().bottom); in testOnBoundsChange()
357 bounds = mockDrawable.getBounds(); in testOnBoundsChange()
[all …]
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityMagnificationTest.java235 final Rect bounds = region.getBounds(); in testSetScaleAndCenter() local
237 final float x = bounds.left + (bounds.width() / 4.0f); in testSetScaleAndCenter()
238 final float y = bounds.top + (bounds.height() / 4.0f); in testSetScaleAndCenter()
288 final Rect bounds = region.getBounds(); in testSetMagnificationConfig_expectedConfig() local
289 final float newX = bounds.left + (bounds.width() / 4.0f); in testSetMagnificationConfig_expectedConfig()
290 final float newY = bounds.top + (bounds.height() / 4.0f); in testSetMagnificationConfig_expectedConfig()
307 final Rect bounds = controller.getMagnificationRegion().getBounds(); in testSetConfigWithDefaultModeAndCenter_expectedConfig() local
309 final float x = bounds.centerX(); in testSetConfigWithDefaultModeAndCenter_expectedConfig()
310 final float y = bounds.centerY(); in testSetConfigWithDefaultModeAndCenter_expectedConfig()
349 final Rect bounds = controller.getMagnificationRegion().getBounds(); in testSetConfigWithActivatedFalse_expectedConfig() local
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/insets/
DRoundedCornerTests.java230 void addChildWindow(Rect bounds) { in addChildWindow() argument
232 attrs.x = bounds.left; in addChildWindow()
233 attrs.y = bounds.top; in addChildWindow()
234 attrs.width = bounds.width(); in addChildWindow()
235 attrs.height = bounds.height(); in addChildWindow()
270 final Rect bounds = new Rect(); in calculateWindowBounds() local
278 bounds.left = Math.max(topLeft != null ? topLeft.getCenter().x : 0, in calculateWindowBounds()
280 bounds.top = Math.max(topLeft != null ? topLeft.getCenter().y : 0, in calculateWindowBounds()
282 bounds.right = Math.min(topRight != null ? topRight.getCenter().x : width, in calculateWindowBounds()
284 bounds.bottom = Math.min(bottomRight != null ? bottomRight.getCenter().y : height, in calculateWindowBounds()
[all …]
/cts/tests/framework/base/windowmanager/app/src/android/server/wm/app/
DLaunchIntoPipHostActivity.java70 final Rect bounds = new Rect(0, 0, 100, 100); in startLaunchIntoPipContainerActivity() local
72 .setSourceRectHint(bounds) in startLaunchIntoPipContainerActivity()
73 .setAspectRatio(new Rational(bounds.width(), bounds.height())) in startLaunchIntoPipContainerActivity()
/cts/tests/tests/graphics/src/android/graphics/cts/
DPathTest.java227 RectF bounds = new RectF(); in testDeprecatedComputeBounds1() local
228 path.computeBounds(bounds, true); in testDeprecatedComputeBounds1()
229 assertEquals(expected.width(), bounds.width(), 0.0f); in testDeprecatedComputeBounds1()
230 assertEquals(expected.height(), bounds.height(), 0.0f); in testDeprecatedComputeBounds1()
231 path.computeBounds(bounds, false); in testDeprecatedComputeBounds1()
232 assertEquals(expected.width(), bounds.width(), 0.0f); in testDeprecatedComputeBounds1()
233 assertEquals(expected.height(), bounds.height(), 0.0f); in testDeprecatedComputeBounds1()
241 RectF bounds = new RectF(LEFT, TOP, RIGHT, BOTTOM); in testDeprecatedComputeBounds2() local
242 path.addRect(bounds, Path.Direction.CW); in testDeprecatedComputeBounds2()
243 path.computeBounds(bounds, true); in testDeprecatedComputeBounds2()
[all …]
/cts/tests/autofillservice/src/android/autofillservice/cts/
DLoginWithCustomHighlightActivityTest.java76 final Rect bounds = MyDrawable.getAutofilledBounds();
79 if (bounds.isEmpty() || bounds.right != width || bounds.bottom != height) {
81 + ", height " + height + ", but bounds was " + bounds);
/cts/tests/framework/base/windowmanager/src/android/server/wm/window/
DWindowMetricsTest.java45 final Rect bounds = new Rect(0, 0, 1000, 1000); in testConstructor() local
48 final WindowMetrics windowMetrics = new WindowMetrics(bounds, windowInsets, density); in testConstructor()
50 assertThat(windowMetrics.getBounds()).isEqualTo(bounds); in testConstructor()
/cts/tests/framework/base/windowmanager/src/android/server/wm/activity/
DActivityRecordInputSinkTests.java179 Rect bounds = activity.getBounds(); in touchButtonsAndAssert() local
180 bounds.offset(0, -bounds.height() / 3); in touchButtonsAndAssert()
181 mTouchHelper.tapOnCenter(bounds, displayId, waitForAnimation); in touchButtonsAndAssert()
187 bounds.offset(0, 2 * bounds.height() / 3); in touchButtonsAndAssert()
188 mTouchHelper.tapOnCenter(bounds, displayId, waitForAnimation); in touchButtonsAndAssert()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DAccessibilityNodeInfoUtils.kt28 val AccessibilityNodeInfo.bounds: Rect get() = Rect().also { getBoundsInScreen(it) } in <lambda>() constant
31 val bounds = bounds in AccessibilityNodeInfo() constant
/cts/tests/tests/widget/src/android/widget/cts/
DCompoundButtonTest.java325 Rect bounds; in testOnDraw() local
344 bounds = drawable.copyBounds(); in testOnDraw()
345 assertEquals(0, bounds.left); in testOnDraw()
346 assertEquals(drawableWidth, bounds.right); in testOnDraw()
347 assertEquals(0, bounds.top); in testOnDraw()
348 assertEquals(drawableHeight, bounds.bottom); in testOnDraw()
353 bounds = drawable.copyBounds(); in testOnDraw()
354 assertEquals(0, bounds.left); in testOnDraw()
355 assertEquals(drawableWidth, bounds.right); in testOnDraw()
356 assertEquals(viewHeight - drawableHeight, bounds.top); in testOnDraw()
[all …]
/cts/tests/input/src/android/input/cts/
DInputInjectionTest.kt222 val bounds = getActivityBounds(INPUT_INJECTION_COMPONENT) in <lambda>() constant
226 bounds.centerX().toFloat(), bounds.centerY().toFloat(), 0)) in <lambda>()
230 bounds.centerX().toFloat(), bounds.centerY().toFloat(), 0)) in <lambda>()
252 return activity.bounds ?: fail("Failed to get bounds for activity $component") in getActivityBounds()
/cts/tests/framework/base/windowmanager/src/android/server/wm/other/
DPrivacyIndicatorBoundsTests.java109 Rect bounds = insets.getPrivacyIndicatorBounds(); in testStaticBoundsAreNotNull() local
110 assertNotNull(bounds); in testStaticBoundsAreNotNull()
120 assertEquals(bounds.top, 0); in testStaticBoundsAreNotNull()
125 assertTrue(bounds.left >= 0); in testStaticBoundsAreNotNull()
126 assertTrue(bounds.right >= 0); in testStaticBoundsAreNotNull()

1234