Home
last modified time | relevance | path

Searched refs:density (Results 1 – 25 of 42) sorted by relevance

12

/cts/tests/tests/hardware/src/android/hardware/cts/
DLowRamDeviceTest.java94 int density = mDisplayMetrics.densityDpi; in testMinimumMemory() local
101 density, supports64Bit, screenSize, watch)); in testMinimumMemory()
106 } else if (lessThanDpi(density, DENSITY_HIGH, screenSize, in testMinimumMemory()
108 lessThanDpi(density, DENSITY_MEDIUM, screenSize, SCREENLAYOUT_SIZE_LARGE) || in testMinimumMemory()
109 lessThanDpi(density, DENSITY_LOW, screenSize, SCREENLAYOUT_SIZE_XLARGE)) { in testMinimumMemory()
116 } else if (greaterThanDpi(density, DENSITY_560, screenSize, in testMinimumMemory()
118 greaterThanDpi(density, DENSITY_400, screenSize, SCREENLAYOUT_SIZE_LARGE) || in testMinimumMemory()
119 greaterThanDpi(density, DENSITY_XHIGH, screenSize, SCREENLAYOUT_SIZE_XLARGE)) { in testMinimumMemory()
126 } else if (greaterThanDpi(density, DENSITY_400, screenSize, in testMinimumMemory()
128 greaterThanDpi(density, DENSITY_XHIGH, screenSize, SCREENLAYOUT_SIZE_LARGE) || in testMinimumMemory()
[all …]
/cts/hostsidetests/theme/
Dgenerate_images.py120 density = device.get_density()
122 if CTS_THEME_dict[density]:
123 density_bucket = CTS_THEME_dict[density]
125 density_bucket = str(density) + "dpi"
188 def start_emulator(name, density): argument
196 test_avd.configure_screen(density, 360, 640)
224 for density in CTS_THEME_dict.keys():
225 emulator = start_emulator(argv[1], density)
229 print("Generated reference images for %ddpi" % density)
231 print("Failed to generate reference images for %ddpi" % density)
Davd.py82 def configure_screen(self, density, width_dp, height_dp): argument
83 width_px = int(math.ceil(width_dp * density / 1600) * 10)
84 height_px = int(math.ceil(height_dp * density / 1600) * 10)
85 self._opts = "-prop qemu.sf.lcd_density=%d -skin %dx%d " % (density, width_px, height_px)
DREADME109 native density; however, many of the tests will also work in a scaled density.
110 If you don't possess a device for a given density and would still like to run
111 tests for that density, you can manually force scaling via:
113 adb shell wm density <dpi>
116 To reset the device to its native density, run:
118 adb shell wm density reset
/cts/tools/utils/
Drm_dup_holo_imgs.py42 for density in densities:
43 portDir = getDirName(density, sw, False)
44 landDir = getDirName(density, sw, True)
61 def getDirName(density, sw, land): argument
67 return name + density
/cts/tests/tests/dpi/src/android/dpi/cts/
DConfigurationTest.java66 double density = 160.0d * mMetrics.density; in testScreenConfiguration() local
67 assertTrue("Screen density must be at least 100 dpi: " + density, density >= 100.0d); in testScreenConfiguration()
95 assertEquals(mMetrics.density, in testScreenConfiguration()
105 float dpHeight = mMetrics.heightPixels / mMetrics.density; in testAutomotiveMinimumScreenSize()
106 float dpWidth = mMetrics.widthPixels / mMetrics.density; in testAutomotiveMinimumScreenSize()
DConfigurationScreenLayoutTest.java130 int longSize = (int) (max / metrics.density); in reduceScreenLayout()
131 int shortSize = (int) (min / metrics.density); in reduceScreenLayout()
/cts/tests/tests/util/src/android/util/cts/
DDisplayMetricsTest.java53 assertTrue((0.1 <= outMetrics.density) && (outMetrics.density <= 4)); in testDisplayMetricsOp()
65 assertTrue((0.1 <= metrics.density) && (metrics.density <= 4)); in testDisplayMetricsOp()
DTypedValueTest.java53 dm.density = 1.1f; in testComplexToDimension()
98 dm.density = 1.1f; in testComplexToDimensionPixelSize()
148 dm.density = 1.1f; in testApplyDimension()
155 assertEquals(10 * dm.density, TypedValue in testApplyDimension()
218 dm.density = 1.1f; in testGetDimension()
/cts/hostsidetests/theme/src/android/theme/cts/
DThemeHostTest.java97 final String density = getDensityBucketForDevice(mDevice); in setUp() local
98 final String referenceZipAssetPath = String.format("/%s.zip", density); in setUp()
238 final int density; in getDensityBucketForDevice() local
240 density = getDensityForDevice(device); in getDensityBucketForDevice()
245 switch (density) { in getDensityBucketForDevice()
268 bucket = density + "dpi"; in getDensityBucketForDevice()
273 "Device density detected as " + density + " (" + bucket + ")"); in getDensityBucketForDevice()
/cts/tests/leanbackjank/app/src/android/leanbackjank/app/
DUtils.java81 float density = ctx.getResources().getDisplayMetrics().density; in convertDpToPixel() local
82 return Math.round((float) dp * density); in convertDpToPixel()
/cts/tests/framework/base/windowmanager/app/src/android/server/wm/app/
DVirtualDisplayActivity.java80 final int density; field in VirtualDisplayActivity.VirtualDisplayEntry
82 VirtualDisplayEntry(VirtualDisplay display, SurfaceView surfaceView, int density, in VirtualDisplayEntry() argument
86 this.density = density; in VirtualDisplayEntry()
237 entry.display.resize(width, height, entry.density); in surfaceChanged()
250 surfaceHolder.getSurfaceFrame().height() / 2, vd.density); in resizeDisplay()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DWidgetTestUtils.java121 Assert.assertEquals(expected * context.getResources().getDisplayMetrics().density, in assertScaledPixels()
127 float density = context.getResources().getDisplayMetrics().density; in convertDipToPixels() local
128 return Math.round(density * dip); in convertDipToPixels()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DWidgetTestUtils.java121 Assert.assertEquals(expected * context.getResources().getDisplayMetrics().density, in assertScaledPixels()
127 float density = context.getResources().getDisplayMetrics().density; in convertDipToPixels() local
128 return Math.round(density * dip); in convertDipToPixels()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/
DIProjectionService.aidl25 void startRendering(in Surface surface, int width, int height, int density, int viewType); in startRendering() argument
DProjectionService.java77 final int density, in startRendering() argument
85 mDisplay = manager.createVirtualDisplay(DISPLAY_NAME, width, height, density, in startRendering()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DDisplayTests.java216 void overrideDisplayMetrics(final Size size, final int density) { in overrideDisplayMetrics() argument
217 mInitialDisplayMetrics.setDisplayMetrics(size, density); in overrideDisplayMetrics()
DMultiDisplayTestBase.java175 void setDisplayMetrics(final Size size, final int density) { in setDisplayMetrics() argument
177 setDensity(density); in setDisplayMetrics()
197 private void setDensity(final int density) { in setDensity() argument
198 executeShellCommand(WM_DENSITY + " " + density); in setDensity()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DNinePatchDrawableTest.java440 void setTargetDensity(NinePatchDrawable dr, int density); in setTargetDensity() argument
505 verifySetTargetDensityOuter((dr, density) -> dr.setTargetDensity(density)); in testSetTargetDensity()
512 verifySetTargetDensityOuter((dr, density) -> { in testSetTargetDensity_Canvas() argument
514 c.setDensity(density); in testSetTargetDensity_Canvas()
523 verifySetTargetDensityOuter((dr, density) -> { in testSetTargetDensity_DisplayMetrics() argument
525 dm.densityDpi = density; in testSetTargetDensity_DisplayMetrics()
DDrawableTest.java395 float density = mContext.getResources().getDisplayMetrics().density; in testImageIntrinsicScaledForDensity() local
396 int densityAdjustedSize = Math.round(64 / density); in testImageIntrinsicScaledForDensity()
410 float density = mContext.getResources().getDisplayMetrics().density; in testImageIntrinsicScaledForDensityWithBitmapOptions() local
411 int densityAdjustedSize = Math.round(64 / density); in testImageIntrinsicScaledForDensityWithBitmapOptions()
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/
DScreenDeviceInfo.java43 store.addResult("density", metrics.density); in collectDeviceInfo()
/cts/tests/tests/theme/src/android/theme/cts/
DWatchPercentageScreenDimenTest.java103 float widthDp = mDisplayMetrics.widthPixels / mDisplayMetrics.density; in getMaxErrorRatio()
/cts/tests/tests/widget/src/android/widget/cts/util/
DTestUtils.java359 final float density = context.getResources().getDisplayMetrics().density;
360 return (int) (dp * density + 0.5f);
/cts/tests/tests/widget/src/android/widget/cts/
DAdapterViewTest.java220 float density = mActivity.getResources().getDisplayMetrics().density; in testAccessVisiblePosition() local
221 int bottom = (int) (LAYOUT_HEIGHT * density * fontScale); in testAccessVisiblePosition()
/cts/tests/app/src/android/app/cts/
DActivityManagerMemoryClassTest.java187 int density = resetDensityIfNeeded(uiDevice); in testGetMemoryClass() local
196 restoreDensityIfNeeded(uiDevice, density); in testGetMemoryClass()

12