Home
last modified time | relevance | path

Searched refs:targetDensity (Results 1 – 4 of 4) sorted by relevance

/cts/hostsidetests/services/activitymanager/src/android/server/cts/
DDisplaySizeTest.java104 final int targetDensity = (int) (stableDensity * 0.85); in setUnsupportedDensity() local
105 setDensity(targetDensity); in setUnsupportedDensity()
123 private void setDensity(int targetDensity) throws DeviceNotAvailableException { in setDensity() argument
124 mDevice.executeShellCommand("wm density " + targetDensity); in setDensity()
128 final boolean success = output.contains("Override density: " + targetDensity); in setDensity()
130 assertTrue("Failed to set density to " + targetDensity, success); in setDensity()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DBitmapDrawableTest.java355 int sourceDensity, targetDensity; in testSetTargetDensity() local
365 targetDensity = canvas.getDensity(); in testSetTargetDensity()
368 sourceWidth, sourceDensity, targetDensity); in testSetTargetDensity()
370 sourceHeight, sourceDensity, targetDensity); in testSetTargetDensity()
379 targetDensity = mContext.getResources().getDisplayMetrics().densityDpi; in testSetTargetDensity()
382 sourceWidth, sourceDensity, targetDensity); in testSetTargetDensity()
384 sourceHeight, sourceDensity, targetDensity); in testSetTargetDensity()
394 targetDensity = sourceDensity * 2; in testSetTargetDensity()
395 bitmapDrawable.setTargetDensity(targetDensity); in testSetTargetDensity()
397 sourceWidth, sourceDensity, targetDensity); in testSetTargetDensity()
[all …]
DNinePatchDrawableTest.java339 int targetDensity = mResources.getDisplayMetrics().densityDpi; in testInflate() local
341 sourceWidth, sourceDensity, targetDensity); in testInflate()
343 sourceHeight, sourceDensity, targetDensity); in testInflate()
/cts/tests/tests/content/src/android/content/res/cts/
DResourcesTest.java303 int targetDensity = mResources.getDisplayMetrics().densityDpi; in testGetDrawable() local
306 assertEquals(212 * targetDensity / defaultDensity, draw.getIntrinsicWidth(), 1); in testGetDrawable()
307 assertEquals(142 * targetDensity / defaultDensity, draw.getIntrinsicHeight(), 1); in testGetDrawable()