/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | RippleDrawableTest.java | 82 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local 84 verifyPreloadDensityInner(res, densityDpi); in testPreloadDensity() 86 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity() 106 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument 119 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner() 125 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner() 131 DrawableTestUtils.setResourcesDensity(res, densityDpi); in verifyPreloadDensityInner()
|
D | VectorDrawableSizeTest.java | 69 final int densityDpi = mResources.getConfiguration().densityDpi; in testVectorDrawableSize() local 72 assertEquals(Math.round(mDpSize * densityDpi / 160f), drawable.getIntrinsicWidth()); in testVectorDrawableSize() 73 assertEquals(Math.round(mDpSize * densityDpi / 160f), drawable.getIntrinsicHeight()); in testVectorDrawableSize()
|
D | VectorDrawableTest.java | 410 final int densityDpi = mResources.getConfiguration().densityDpi; in testPreloadDensity() local 412 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity() 413 verifyPreloadDensityInner(mResources, densityDpi); in testPreloadDensity() 415 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity() 421 final int densityDpi = mResources.getConfiguration().densityDpi; in testPreloadDensity_tvdpi() local 426 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity_tvdpi() 437 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument 449 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner() 453 final float approxHalf = (float)(densityDpi / 2) / densityDpi; in verifyPreloadDensityInner() 457 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner() [all …]
|
D | InsetDrawableTest.java | 440 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local 442 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity() 443 verifyPreloadDensityInner(res, densityDpi); in testPreloadDensity() 445 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity() 452 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity_tvdpi() local 457 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity_tvdpi() 467 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument 480 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner() 484 final float approxHalf = (float)(densityDpi / 2) / densityDpi; in verifyPreloadDensityInner() 489 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner() [all …]
|
D | NinePatchDrawableTest.java | 383 int targetDensity = mResources.getDisplayMetrics().densityDpi; in testInflate() 445 final int densityDpi = res.getConfiguration().densityDpi; in verifySetTargetDensityOuter() local 451 DrawableTestUtils.setResourcesDensity(res, densityDpi); in verifySetTargetDensityOuter() 525 dm.densityDpi = density; in testSetTargetDensity_DisplayMetrics() 533 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local 538 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity() 592 … private static NinePatchDrawable preloadedDrawable(Resources res, int densityDpi, int sourceResId) in preloadedDrawable() argument 594 DrawableTestUtils.setResourcesDensity(res, densityDpi); in preloadedDrawable() 604 final int densityDpi = res.getConfiguration().densityDpi; in testOutlinePreloadDensity() local 608 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testOutlinePreloadDensity() [all …]
|
D | AnimatedStateListDrawableTest.java | 176 final int densityDpi = res.getConfiguration().densityDpi; in runPreloadDensityTestForDrawable() local 178 runPreloadDensityTestForDrawableInner(res, densityDpi, drawableResId, isConstantSize); in runPreloadDensityTestForDrawable() 180 DrawableTestUtils.setResourcesDensity(res, densityDpi); in runPreloadDensityTestForDrawable() 184 private void runPreloadDensityTestForDrawableInner(Resources res, int densityDpi, in runPreloadDensityTestForDrawableInner() argument 209 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in runPreloadDensityTestForDrawableInner() 218 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in runPreloadDensityTestForDrawableInner() 227 DrawableTestUtils.setResourcesDensity(res, densityDpi); in runPreloadDensityTestForDrawableInner()
|
D | StateListDrawableTest.java | 199 final int densityDpi = res.getConfiguration().densityDpi; in verifyPreloadDensityTestForDrawable() local 201 … verifyPreloadDensityTestForDrawableInner(res, densityDpi, drawableResId, isConstantSize); in verifyPreloadDensityTestForDrawable() 203 DrawableTestUtils.setResourcesDensity(res, densityDpi); in verifyPreloadDensityTestForDrawable() 207 private void verifyPreloadDensityTestForDrawableInner(Resources res, int densityDpi, in verifyPreloadDensityTestForDrawableInner() argument 235 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityTestForDrawableInner() 245 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityTestForDrawableInner() 254 DrawableTestUtils.setResourcesDensity(res, densityDpi); in verifyPreloadDensityTestForDrawableInner()
|
D | GradientDrawableTest.java | 668 final int densityDpi = mResources.getConfiguration().densityDpi; in testPreloadDensity() local 670 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity() 671 verifyPreloadDensityInner(mResources, densityDpi); in testPreloadDensity() 673 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity() 679 final int densityDpi = mResources.getConfiguration().densityDpi; in testPreloadDensity_tvdpi() local 684 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity_tvdpi() 817 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument 834 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner() 838 final float approxHalf = (float)(densityDpi / 2) / densityDpi; in verifyPreloadDensityInner() 845 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner() [all …]
|
D | DrawableTestUtils.java | 124 public static void setResourcesDensity(Resources res, int densityDpi) { in setResourcesDensity() argument 127 config.densityDpi = densityDpi; in setResourcesDensity()
|
D | LayerDrawableTest.java | 1687 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local 1689 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity() 1690 verifyPreloadDensityInner(res, densityDpi); in testPreloadDensity() 1692 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity() 1699 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity_tvdpi() local 1704 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity_tvdpi() 1708 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument 1735 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner() 1739 final float approxHalf = (float)(densityDpi / 2) / densityDpi; in verifyPreloadDensityInner() 1766 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner() [all …]
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | BitmapDrawableTest.java | 72 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local 78 setResourcesDensity(res, densityDpi); in testPreloadDensity() 142 private static void setResourcesDensity(Resources res, int densityDpi) { in setResourcesDensity() argument 145 config.densityDpi = densityDpi; in setResourcesDensity()
|
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/ |
D | ProtoExtractors.java | 40 config.densityDpi = proto.densityDpi; in extract()
|
D | CommandSession.java | 1138 public int densityDpi; 1161 densityDpi = config.densityDpi; 1174 + " smallestWidthDp=" + smallestWidthDp + " densityDpi=" + densityDpi 1196 && densityDpi == that.densityDpi 1214 result = 31 * result + densityDpi; 1237 dest.writeInt(densityDpi); 1253 densityDpi = in.readInt();
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/ |
D | FreeformWindowingModeTests.java | 130 final int densityDpi = in testActivityLifeCycleOnResizeFreeformTask() local 132 final int testTaskSize1 = dpToPx(TEST_TASK_SIZE_DP_1, densityDpi); in testActivityLifeCycleOnResizeFreeformTask() 133 final int testTaskSize2 = dpToPx(TEST_TASK_SIZE_DP_2, densityDpi); in testActivityLifeCycleOnResizeFreeformTask()
|
D | ManifestLayoutTests.java | 161 final int densityDpi = mDisplay.getDpi(); in testLayout() local 162 expectedWidthPx = dpToPx(DEFAULT_WIDTH_DP, densityDpi); in testLayout() 163 expectedHeightPx = dpToPx(DEFAULT_HEIGHT_DP, densityDpi); in testLayout()
|
D | ConfigChangeTests.java | 247 final int densityDpi = extras.getInt(EXTRA_FONT_ACTIVITY_DPI); in testChangeFontScale() local 261 scaledPixelsToPixels(EXPECTED_FONT_SIZE_SP, fontScale, densityDpi); in testChangeFontScale() 305 private static int scaledPixelsToPixels(float sp, float fontScale, int densityDpi) { in scaledPixelsToPixels() argument 307 float f = densityDpi * (1.0f / DEFAULT_DENSITY) * fontScale * sp; in scaledPixelsToPixels()
|
D | CompatScaleTests.java | 119 mAppSizesNormal.densityDpi, mCompatScale, mAppSizesDownscaled.densityDpi); in test_config_densityDpi_scalesCorrectly_inCompatDownscalingMode()
|
D | MultiDisplayTestBase.java | 151 if (config.densityDpi == dpi && config.screenWidthDp == width in getDisplayState() 425 VirtualDisplaySession setDensityDpi(int densityDpi) { in setDensityDpi() argument 426 mDensityDpi = densityDpi; in setDensityDpi() 707 void createDisplays(Size displaySize, int densityDpi, boolean ownContentOnly, in createDisplays() argument 711 String displaySettingsEntry = displaySize + "/" + densityDpi; in createDisplays() 798 if (display.mOverrideConfiguration.densityDpi == 0) { in areDisplaysValid()
|
/cts/tests/tests/view/src/android/view/cts/ |
D | ContextThemeWrapperTest.java | 144 final int realDensity = mContext.getResources().getConfiguration().densityDpi; in testApplyOverrideConfiguration() 151 overrideConfig.densityDpi = expectedDensity; in testApplyOverrideConfiguration() 155 assertEquals(expectedDensity, actualConfiguration.densityDpi); in testApplyOverrideConfiguration()
|
/cts/tests/framework/base/windowmanager/app/src/android/server/wm/app/ |
D | VirtualDisplayActivity.java | 172 final int densityDpi = entry.extras.getInt(KEY_DENSITY_DPI, DEFAULT_DENSITY_DPI); in surfaceCreated() local 204 Log.d(TAG, "createVirtualDisplay: " + width + "x" + height + ", dpi: " + densityDpi in surfaceCreated() 212 height, densityDpi, surface, flags); in surfaceCreated() 214 new VirtualDisplayEntry(virtualDisplay, entry.surfaceView, densityDpi, in surfaceCreated()
|
D | FontScaleActivity.java | 72 final int fontActivityDpi = getResources().getDisplayMetrics().densityDpi; in dumpActivityDpi()
|
/cts/hostsidetests/theme/app/src/android/theme/app/ |
D | AssetBucketVerifier.java | 56 int deviceDensityDpi = context.getResources().getConfiguration().densityDpi; in verifyAssetBucket()
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | AImageDecoderTest.java | 305 final int originalDensity = res.getDisplayMetrics().densityDpi; in decode() 307 res.getDisplayMetrics().densityDpi = DisplayMetrics.DENSITY_DEFAULT; in decode() 311 res.getDisplayMetrics().densityDpi = originalDensity; in decode() 370 final int originalDensity = res.getDisplayMetrics().densityDpi; 372 res.getDisplayMetrics().densityDpi = DisplayMetrics.DENSITY_DEFAULT; 376 res.getDisplayMetrics().densityDpi = originalDensity; 797 final int originalDensity = res.getDisplayMetrics().densityDpi; 799 res.getDisplayMetrics().densityDpi = DisplayMetrics.DENSITY_DEFAULT; 803 res.getDisplayMetrics().densityDpi = originalDensity;
|
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ |
D | ScreenDeviceInfo.java | 50 store.addResult("density_dpi", metrics.densityDpi); in collectDeviceInfo()
|
/cts/tests/tests/dpi/src/android/dpi/cts/ |
D | ConfigurationTest.java | 96 (float) mMetrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT, in testScreenConfiguration()
|