Home
last modified time | relevance | path

Searched refs:densityDpi (Results 1 – 25 of 53) sorted by relevance

123

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DRippleDrawableTest.java83 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local
85 verifyPreloadDensityInner(res, densityDpi); in testPreloadDensity()
87 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity()
107 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument
120 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner()
126 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner()
132 DrawableTestUtils.setResourcesDensity(res, densityDpi); in verifyPreloadDensityInner()
DVectorDrawableSizeTest.java69 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()
DVectorDrawableTest.java420 final int densityDpi = mResources.getConfiguration().densityDpi; in testPreloadDensity() local
422 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity()
423 verifyPreloadDensityInner(mResources, densityDpi); in testPreloadDensity()
425 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity()
431 final int densityDpi = mResources.getConfiguration().densityDpi; in testPreloadDensity_tvdpi() local
436 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity_tvdpi()
447 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument
459 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner()
463 final float approxHalf = (float)(densityDpi / 2) / densityDpi; in verifyPreloadDensityInner()
467 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner()
[all …]
DInsetDrawableTest.java440 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 …]
DNinePatchDrawableTest.java383 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 …]
DAnimatedStateListDrawableTest.java176 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()
DStateListDrawableTest.java199 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()
DGradientDrawableTest.java668 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()
873 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument
890 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner()
894 final float approxHalf = (float)(densityDpi / 2) / densityDpi; in verifyPreloadDensityInner()
901 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner()
[all …]
DDrawableTestUtils.java128 public static void setResourcesDensity(Resources res, int densityDpi) { in setResourcesDensity() argument
131 config.densityDpi = densityDpi; in setResourcesDensity()
DLayerDrawableTest.java1687 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/
DBitmapDrawableTest.java72 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/
DProtoExtractors.java40 config.densityDpi = proto.densityDpi; in extract()
DMultiDisplayTestBase.java134 if (config.densityDpi == dpi && config.screenWidthDp == width in getDisplayState()
228 VirtualDisplaySession setDensityDpi(int densityDpi) { in setDensityDpi() argument
229 mDensityDpi = densityDpi; in setDensityDpi()
517 void createDisplays(Size displaySize, int densityDpi, boolean ownContentOnly, in createDisplays() argument
521 String displaySettingsEntry = displaySize + "/" + densityDpi; in createDisplays()
608 if (display.getOverrideConfiguration().densityDpi == 0) { in areDisplaysValid()
DCommandSession.java1197 public int densityDpi;
1220 densityDpi = config.densityDpi;
1233 + " smallestWidthDp=" + smallestWidthDp + " densityDpi=" + densityDpi
1255 && densityDpi == that.densityDpi
1273 result = 31 * result + densityDpi;
1296 dest.writeInt(densityDpi);
1312 densityDpi = in.readInt();
/cts/tests/framework/base/windowmanager/src/android/server/wm/activity/
DConfigChangeTests.java260 final int densityDpi = extras.getInt(EXTRA_FONT_ACTIVITY_DPI); in testChangeFontScale() local
280 () -> scaledPixelsToPixels(EXPECTED_FONT_SIZE_SP, fontScale, densityDpi) in testChangeFontScale()
323 private static int scaledPixelsToPixels(float sp, float fontScale, int densityDpi) { in scaledPixelsToPixels() argument
325 float f = densityDpi * (1.0f / DEFAULT_DENSITY) * fontScale * sp; in scaledPixelsToPixels()
326 logAlways("scaledPixelsToPixels, f=" + f + ", densityDpi=" + densityDpi in scaledPixelsToPixels()
/cts/tests/tests/view/src/android/view/cts/
DContextThemeWrapperTest.java146 final int realDensity = mContext.getResources().getConfiguration().densityDpi; in testApplyOverrideConfiguration()
153 overrideConfig.densityDpi = expectedDensity; in testApplyOverrideConfiguration()
157 assertEquals(expectedDensity, actualConfiguration.densityDpi); in testApplyOverrideConfiguration()
/cts/tests/framework/base/windowmanager/app/src/android/server/wm/app/
DVirtualDisplayActivity.java173 final int densityDpi = entry.extras.getInt(KEY_DENSITY_DPI, DEFAULT_DENSITY_DPI); in surfaceCreated() local
210 Log.d(TAG, "createVirtualDisplay: " + width + "x" + height + ", dpi: " + densityDpi in surfaceCreated()
218 height, densityDpi, surface, flags); in surfaceCreated()
220 new VirtualDisplayEntry(virtualDisplay, entry.surfaceView, densityDpi, in surfaceCreated()
DFontScaleActivity.java75 final int fontActivityDpi = getResources().getDisplayMetrics().densityDpi; in dumpActivityDpi()
/cts/tests/framework/base/windowmanager/src/android/server/wm/display/
DFreeformWindowingModeTests.java136 final int densityDpi = in testActivityLifeCycleOnResizeFreeformTask() local
138 final int testTaskSize1 = dpToPx(TEST_TASK_SIZE_DP_1, densityDpi); in testActivityLifeCycleOnResizeFreeformTask()
139 final int testTaskSize2 = dpToPx(TEST_TASK_SIZE_DP_2, densityDpi); in testActivityLifeCycleOnResizeFreeformTask()
/cts/tests/tests/content/src/android/content/wm/cts/
DContextTestBase.java101 public void resizeSecondaryDisplay(int width, int height, int densityDpi) { in resizeSecondaryDisplay() argument
102 mSecondaryDisplay.resize(width, height, densityDpi); in resizeSecondaryDisplay()
/cts/hostsidetests/theme/app/src/android/theme/app/
DAssetBucketVerifier.java56 int deviceDensityDpi = context.getResources().getConfiguration().densityDpi; in verifyAssetBucket()
/cts/tests/framework/base/windowmanager/src/android/server/wm/other/
DCompatScaleTests.java218 mAppSizesNormal.densityDpi, in test_scalesCorrectly_inCompatDownscalingMode()
220 mAppSizesDownscaled.densityDpi); in test_scalesCorrectly_inCompatDownscalingMode()
278 mAppSizesNormal.densityDpi, in test_scalesCorrectly_inCompatUpscalingMode()
280 mAppSizesUpscaled.densityDpi); in test_scalesCorrectly_inCompatUpscalingMode()
/cts/tests/framework/base/windowmanager/src/android/server/wm/animations/
DManifestLayoutTests.java190 final int densityDpi = DisplayMetrics.DENSITY_DEVICE_STABLE; in calculateExpectedSize() local
191 expectedWidthPx = dpToPx(DEFAULT_WIDTH_DP, densityDpi); in calculateExpectedSize()
192 expectedHeightPx = dpToPx(DEFAULT_HEIGHT_DP, densityDpi); in calculateExpectedSize()
/cts/tests/tests/graphics/src/android/graphics/cts/
DAImageDecoderTest.java328 final int originalDensity = res.getDisplayMetrics().densityDpi; in decode()
330 res.getDisplayMetrics().densityDpi = DisplayMetrics.DENSITY_DEFAULT; in decode()
334 res.getDisplayMetrics().densityDpi = originalDensity; in decode()
466 final int originalDensity = res.getDisplayMetrics().densityDpi;
468 res.getDisplayMetrics().densityDpi = DisplayMetrics.DENSITY_DEFAULT;
472 res.getDisplayMetrics().densityDpi = originalDensity;
893 final int originalDensity = res.getDisplayMetrics().densityDpi;
895 res.getDisplayMetrics().densityDpi = DisplayMetrics.DENSITY_DEFAULT;
899 res.getDisplayMetrics().densityDpi = originalDensity;
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/
DProjectionActivity.java67 … mService.startRendering(mSurface, mWidth, mHeight, metrics.densityDpi, mType.ordinal());

123