/cts/tests/tests/view/src/android/view/cts/util/ |
D | DisplayUtils.java | 46 final DisplayMetrics displayMetrics = new DisplayMetrics(); in isCloseToSquareDisplay() local 47 activity.getDisplay().getRealMetrics(displayMetrics); in isCloseToSquareDisplay() 48 final int w = displayMetrics.widthPixels; in isCloseToSquareDisplay() 49 final int h = displayMetrics.heightPixels; in isCloseToSquareDisplay() 56 final DisplayMetrics displayMetrics = new DisplayMetrics(); in isDevicePortrait() local 57 activity.getDisplay().getRealMetrics(displayMetrics); in isDevicePortrait() 58 return displayMetrics.widthPixels < displayMetrics.heightPixels; in isDevicePortrait()
|
/cts/tests/tests/view/src/android/view/cts/ |
D | HandwritingBoundsOffsetTest.java | 72 final DisplayMetrics displayMetrics = activity.getResources().getDisplayMetrics(); in handwritingBoundsOffset_textViewDefaultValue() local 76 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, displayMetrics)); in handwritingBoundsOffset_textViewDefaultValue() 78 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, displayMetrics)); in handwritingBoundsOffset_textViewDefaultValue() 81 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 40, displayMetrics)); in handwritingBoundsOffset_textViewDefaultValue() 83 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 40, displayMetrics)); in handwritingBoundsOffset_textViewDefaultValue() 91 final DisplayMetrics displayMetrics = activity.getResources().getDisplayMetrics(); in handwritingBoundsOffset_editTextDefaultValue() local 95 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, displayMetrics)); in handwritingBoundsOffset_editTextDefaultValue() 97 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, displayMetrics)); in handwritingBoundsOffset_editTextDefaultValue() 100 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 40, displayMetrics)); in handwritingBoundsOffset_editTextDefaultValue() 102 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 40, displayMetrics)); in handwritingBoundsOffset_editTextDefaultValue()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20501/src/android/security/cts/CVE_2022_20501/ |
D | PocService.java | 45 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 46 layoutParams.width = displayMetrics.widthPixels; in onCreate() 47 layoutParams.height = displayMetrics.heightPixels; in onCreate() 48 layoutParams.x = displayMetrics.widthPixels / 2; in onCreate() 49 layoutParams.y = displayMetrics.heightPixels / 2; in onCreate()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-20913/src/android/security/cts/CVE_2023_20913/ |
D | PocService.java | 47 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 48 layoutParams.width = displayMetrics.widthPixels; in onCreate() 49 layoutParams.height = displayMetrics.heightPixels; in onCreate() 50 layoutParams.x = displayMetrics.widthPixels / 2; in onCreate() 51 layoutParams.y = displayMetrics.heightPixels / 2; in onCreate()
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | CanvasStateTests.java | 178 DisplayMetrics displayMetrics = in testDrawScreenWideBitmap() local 180 assertTrue(displayMetrics.widthPixels <= canvas.getMaximumBitmapWidth()); in testDrawScreenWideBitmap() 181 assertTrue(displayMetrics.heightPixels <= canvas.getMaximumBitmapHeight()); in testDrawScreenWideBitmap() 182 Bitmap bitmap = Bitmap.createBitmap(displayMetrics.widthPixels, in testDrawScreenWideBitmap() 183 displayMetrics.heightPixels, Bitmap.Config.ARGB_8888); in testDrawScreenWideBitmap() 195 DisplayMetrics displayMetrics = in testDrawLargeBitmap() local 198 int bWidth = displayMetrics.widthPixels * 3 / 2; in testDrawLargeBitmap() 199 int bHeight = displayMetrics.heightPixels * 3 / 2; in testDrawLargeBitmap()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/display/ |
D | DisplayTests.java | 183 ReportedDisplayMetrics displayMetrics = displayMetricsSession.getDisplayMetrics(); in testForceDisplayMetrics() local 184 assertEquals(overrideSize, displayMetrics.getOverrideSize()); in testForceDisplayMetrics() 185 assertEquals(overrideDensity, displayMetrics.getOverrideDensity()); in testForceDisplayMetrics() 193 displayMetrics = displayMetricsSession.getDisplayMetrics(); in testForceDisplayMetrics() 194 assertEquals(overrideSize, displayMetrics.getOverrideSize()); in testForceDisplayMetrics() 195 assertEquals(overrideDensity, displayMetrics.getOverrideDensity()); in testForceDisplayMetrics()
|
/cts/tests/tests/content/src/android/content/wm/cts/ |
D | ContextRegisterComponentCallbacksTest.java | 170 final DisplayMetrics displayMetrics = new DisplayMetrics(); in testRegisterComponentCallbacksOnWindowContext() local 171 secondaryDisplay.getMetrics(displayMetrics); in testRegisterComponentCallbacksOnWindowContext() 173 final int newWidth = displayMetrics.widthPixels + 10; in testRegisterComponentCallbacksOnWindowContext() 174 final int newHeight = displayMetrics.heightPixels + 10; in testRegisterComponentCallbacksOnWindowContext() 176 resizeSecondaryDisplay(newWidth, newHeight, displayMetrics.densityDpi); in testRegisterComponentCallbacksOnWindowContext()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | SimpleKeyguardService.java | 53 DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); in onCreateKeyguardSurface() local 56 wvr.setView(createView(context), displayMetrics.widthPixels, displayMetrics.heightPixels); in onCreateKeyguardSurface()
|
/cts/hostsidetests/securitybulletin/test-apps/BUG-183411279/src/android/security/cts/BUG_183411279/ |
D | OverlayService.java | 44 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 45 int scaledWidth = (int) (displayMetrics.widthPixels * 0.9); in onCreate() 46 int scaledHeight = (int) (displayMetrics.heightPixels * 0.9); in onCreate()
|
/cts/hostsidetests/securitybulletin/test-apps/BUG-183963253/src/android/security/cts/BUG_183963253/ |
D | OverlayService.java | 44 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 45 int scaledWidth = (int) (displayMetrics.widthPixels * 0.9); in onCreate() 46 int scaledHeight = (int) (displayMetrics.heightPixels * 0.9); in onCreate()
|
/cts/hostsidetests/securitybulletin/test-apps/BUG-183794206/src/android/security/cts/BUG_183794206/ |
D | OverlayService.java | 44 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 45 int scaledWidth = (int) (displayMetrics.widthPixels * 0.9); in onCreate() 46 int scaledHeight = (int) (displayMetrics.heightPixels * 0.9); in onCreate()
|
/cts/hostsidetests/securitybulletin/test-apps/BUG-182810085/src/android/security/cts/BUG_182810085/ |
D | OverlayService.java | 44 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 45 int scaledWidth = (int) (displayMetrics.widthPixels * 0.9); in onCreate() 46 int scaledHeight = (int) (displayMetrics.heightPixels * 0.9); in onCreate()
|
/cts/hostsidetests/securitybulletin/test-apps/BUG-182808318/src/android/security/cts/BUG_182808318/ |
D | OverlayService.java | 44 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 45 int scaledWidth = (int) (displayMetrics.widthPixels * 0.9); in onCreate() 46 int scaledHeight = (int) (displayMetrics.heightPixels * 0.9); in onCreate()
|
/cts/hostsidetests/securitybulletin/test-apps/BUG-182282630/src/android/security/cts/BUG_182282630/ |
D | OverlayService.java | 44 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 45 int scaledWidth = (int) (displayMetrics.widthPixels * 0.9); in onCreate() 46 int scaledHeight = (int) (displayMetrics.heightPixels * 0.9); in onCreate()
|
/cts/hostsidetests/securitybulletin/test-apps/BUG-183613671/src/android/security/cts/BUG_183613671/ |
D | OverlayService.java | 44 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 45 int scaledWidth = (int) (displayMetrics.widthPixels * 0.9); in onCreate() 46 int scaledHeight = (int) (displayMetrics.heightPixels * 0.9); in onCreate()
|
/cts/hostsidetests/securitybulletin/test-apps/BUG-183411210/src/android/security/cts/BUG_183411210/ |
D | OverlayService.java | 44 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 45 int scaledWidth = (int) (displayMetrics.widthPixels * 0.9); in onCreate() 46 int scaledHeight = (int) (displayMetrics.heightPixels * 0.9); in onCreate()
|
/cts/hostsidetests/securitybulletin/test-apps/BUG-183410508/src/android/security/cts/BUG_183410508/ |
D | OverlayService.java | 44 DisplayMetrics displayMetrics = Resources.getSystem().getDisplayMetrics(); in onCreate() local 45 int scaledWidth = (int) (displayMetrics.widthPixels * 0.9); in onCreate() 46 int scaledHeight = (int) (displayMetrics.heightPixels * 0.9); in onCreate()
|
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/ |
D | WindowMetricsTestHelper.java | 143 final DisplayMetrics displayMetrics = new DisplayMetrics(); in assertMetricsMatchDisplay() local 144 display.getMetrics(displayMetrics); in assertMetricsMatchDisplay() 148 displayMetrics.widthPixels, currentBounds.width()); in assertMetricsMatchDisplay() 150 displayMetrics.heightPixels, currentBounds.height()); in assertMetricsMatchDisplay() 152 displayMetrics.density, currentMetrics.getDensity(), 0.0f); in assertMetricsMatchDisplay()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/activity/ |
D | CloseOnOutsideTests.java | 80 DisplayMetrics displayMetrics = in touchAndAssert() local 92 displayMetrics.widthPixels - statusBarInsets.left - statusBarInsets.right; in touchAndAssert() 94 displayMetrics.heightPixels - statusBarInsets.top - statusBarInsets.bottom; in touchAndAssert()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/multidisplay/ |
D | MultiDisplayKeyguardTests.java | 214 final ReportedDisplayMetrics displayMetrics = in testUnlockScreen_decoredSystemDisplayChanged_dismissesKeyguardOnUnlock() local 218 (int) (displayMetrics.getPhysicalSize().getWidth() * 0.5), in testUnlockScreen_decoredSystemDisplayChanged_dismissesKeyguardOnUnlock() 219 (int) (displayMetrics.getPhysicalSize().getHeight() * 0.5)); in testUnlockScreen_decoredSystemDisplayChanged_dismissesKeyguardOnUnlock() 223 overrideSize, displayMetrics.getPhysicalDensity()); in testUnlockScreen_decoredSystemDisplayChanged_dismissesKeyguardOnUnlock()
|
/cts/tests/tests/content/src/android/content/res/cts/config/ |
D | OverrideConfigTest.kt | 76 val displayMetrics = resources.displayMetrics in setUpRotation() constant 77 val isPortraitByDisplay = displayMetrics.heightPixels > displayMetrics.widthPixels in setUpRotation()
|
/cts/tests/tests/mediacujtest/common/src/android/media/cujcommon/cts/ |
D | PlayerListener.java | 155 final DisplayMetrics displayMetrics = new DisplayMetrics(); in getDeviceOrientation() local 156 activity.getDisplay().getRealMetrics(displayMetrics); in getDeviceOrientation() 157 if (displayMetrics.widthPixels < displayMetrics.heightPixels) { in getDeviceOrientation()
|
D | PinchToZoomTestPlayerListener.java | 103 DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); in setInputRegionSize() local 104 mWidth = displayMetrics.widthPixels; in setInputRegionSize() 105 mHeight = displayMetrics.heightPixels; in setInputRegionSize()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | RemoteViewsTest.java | 1623 DisplayMetrics displayMetrics = textView.getResources().getDisplayMetrics(); in testSetViewLayoutMargin() local 1626 resolveDimenOffset(10, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin() 1627 resolveDimenOffset(20, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin() 1628 resolveDimenOffset(30, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin() 1629 resolveDimenOffset(40, COMPLEX_UNIT_DIP, displayMetrics)); in testSetViewLayoutMargin() 1640 DisplayMetrics displayMetrics = textViewLtr.getResources().getDisplayMetrics(); in testSetViewLayoutMargin_layoutDirection() local 1643 resolveDimenOffset(10, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin_layoutDirection() 1644 resolveDimenOffset(20, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin_layoutDirection() 1645 resolveDimenOffset(30, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin_layoutDirection() 1646 resolveDimenOffset(40, COMPLEX_UNIT_DIP, displayMetrics)); in testSetViewLayoutMargin_layoutDirection() [all …]
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/window/ |
D | WindowPolicyTests.java | 211 final DisplayMetrics displayMetrics = new DisplayMetrics(); in testOptOutEdgeToEdgeDisplayMetrics() local 212 display.getMetrics(displayMetrics); in testOptOutEdgeToEdgeDisplayMetrics() 216 displayMetrics.widthPixels); in testOptOutEdgeToEdgeDisplayMetrics() 220 displayMetrics.heightPixels); in testOptOutEdgeToEdgeDisplayMetrics()
|