/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/framework/base/windowmanager/src/android/server/wm/ |
D | CloseOnOutsideTestActivity.java | 37 DisplayMetrics displayMetrics = getResources().getDisplayMetrics(); in onCreate() local 38 int width = displayMetrics.widthPixels; in onCreate() 39 int height = displayMetrics.heightPixels; in onCreate()
|
D | DisplayTests.java | 173 ReportedDisplayMetrics displayMetrics = displayMetricsSession.getDisplayMetrics(); in testForceDisplayMetrics() local 174 assertEquals(overrideSize, displayMetrics.overrideSize); in testForceDisplayMetrics() 175 assertEquals(overrideDensity, displayMetrics.overrideDensity); in testForceDisplayMetrics() 185 displayMetrics = displayMetricsSession.getDisplayMetrics(); in testForceDisplayMetrics() 186 assertEquals(overrideSize, displayMetrics.overrideSize); in testForceDisplayMetrics() 187 assertEquals(overrideDensity, displayMetrics.overrideDensity); in testForceDisplayMetrics()
|
D | CloseOnOutsideTests.java | 79 DisplayMetrics displayMetrics = mTestActivity.getResources().getDisplayMetrics(); in touchAndAssert() local 80 int width = (int) (displayMetrics.widthPixels * 0.875f); in touchAndAssert() 81 int height = (int) (displayMetrics.heightPixels * 0.875f); in touchAndAssert()
|
D | MultiDisplayKeyguardTests.java | 213 final ReportedDisplayMetrics displayMetrics = in testUnlockScreen_decoredSystemDisplayChanged_dismissesKeyguardOnUnlock() local 216 (int) (displayMetrics.physicalSize.getWidth() * 0.5), in testUnlockScreen_decoredSystemDisplayChanged_dismissesKeyguardOnUnlock() 217 (int) (displayMetrics.physicalSize.getHeight() * 0.5)); in testUnlockScreen_decoredSystemDisplayChanged_dismissesKeyguardOnUnlock() 218 displayMetrics.setDisplayMetrics(overrideSize, displayMetrics.physicalDensity); in testUnlockScreen_decoredSystemDisplayChanged_dismissesKeyguardOnUnlock()
|
D | ActivityManagerGetConfigTests.java | 291 private void checkDeviceConfig(DisplayMetrics displayMetrics, in checkDeviceConfig() argument 294 displayMetrics.widthPixels, deviceConfig.stableScreenWidthPx); in checkDeviceConfig() 296 displayMetrics.heightPixels, deviceConfig.stableScreenHeightPx); in checkDeviceConfig()
|
/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/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-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-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/tests/tests/widget/src/android/widget/cts/ |
D | RemoteViewsTest.java | 1118 DisplayMetrics displayMetrics = textView.getResources().getDisplayMetrics(); in testSetViewLayoutMargin() local 1121 resolveDimenOffset(10, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin() 1122 resolveDimenOffset(20, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin() 1123 resolveDimenOffset(30, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin() 1124 resolveDimenOffset(40, COMPLEX_UNIT_DIP, displayMetrics)); in testSetViewLayoutMargin() 1135 DisplayMetrics displayMetrics = textViewLtr.getResources().getDisplayMetrics(); in testSetViewLayoutMargin_layoutDirection() local 1138 resolveDimenOffset(10, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin_layoutDirection() 1139 resolveDimenOffset(20, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin_layoutDirection() 1140 resolveDimenOffset(30, COMPLEX_UNIT_DIP, displayMetrics), in testSetViewLayoutMargin_layoutDirection() 1141 resolveDimenOffset(40, COMPLEX_UNIT_DIP, displayMetrics)); in testSetViewLayoutMargin_layoutDirection() [all …]
|
D | PopupWindowTest.java | 1872 DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); in testAnchorInPopup() local 1873 float dpWidth = displayMetrics.widthPixels / displayMetrics.density; in testAnchorInPopup() 1874 float dpHeight = displayMetrics.heightPixels / displayMetrics.density; in testAnchorInPopup()
|
/cts/tests/tests/resourcesloader/src/android/content/res/loader/cts/ |
D | Utils.kt | 42 resources.displayMetrics in dpToPx()
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityMagnificationTest.java | 314 final DisplayMetrics displayMetrics = new DisplayMetrics(); in testA11yNodeInfoVisibility_whenOutOfMagnifiedArea_shouldVisible() local 316 activity.getDisplay().getMetrics(displayMetrics); in testA11yNodeInfoVisibility_whenOutOfMagnifiedArea_shouldVisible() 318 displayMetrics.widthPixels, displayMetrics.heightPixels); in testA11yNodeInfoVisibility_whenOutOfMagnifiedArea_shouldVisible()
|
D | AccessibilityTextActionTest.java | 495 final DisplayMetrics displayMetrics = mActivity.getResources().getDisplayMetrics(); in testExtraRendering_textViewShouldProvideExtraDataTextSizeWhenRequested() local 503 newTextSize, displayMetrics); in testExtraRendering_textViewShouldProvideExtraDataTextSizeWhenRequested()
|
/cts/tests/app/shared/src/android/app/cts/ |
D | NotificationTemplateTestBase.kt | 78 density = context.resources.displayMetrics.densityDpi in <lambda>()
|
/cts/tests/tests/uirendering27/src/android/uirendering/cts/testinfrastructure/ |
D | DrawActivity.kt | 95 resources.updateConfiguration(newConfig, resources.displayMetrics) in hashCode()
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/ |
D | DrawActivity.kt | 95 resources.updateConfiguration(newConfig, resources.displayMetrics) in hashCode()
|
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/ |
D | ActivityManagerTestBase.java | 1215 final DisplayMetrics displayMetrics = new DisplayMetrics(); in isCloseToSquareDisplay() local 1216 mDm.getDisplay(DEFAULT_DISPLAY).getRealMetrics(displayMetrics); in isCloseToSquareDisplay() 1217 final int w = displayMetrics.widthPixels; in isCloseToSquareDisplay() 1218 final int h = displayMetrics.heightPixels; in isCloseToSquareDisplay() 1232 final DisplayMetrics displayMetrics = new DisplayMetrics(); in isDisplayPortrait() local 1233 display.getRealMetrics(displayMetrics); in isDisplayPortrait() 1234 return displayMetrics.widthPixels < displayMetrics.heightPixels; in isDisplayPortrait()
|