Home
last modified time | relevance | path

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

12

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DRippleDrawableTest.java80 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local
82 verifyPreloadDensityInner(res, densityDpi); in testPreloadDensity()
84 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity()
88 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument
101 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner()
107 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner()
113 DrawableTestUtils.setResourcesDensity(res, densityDpi); in verifyPreloadDensityInner()
DVectorDrawableSizeTest.java68 final int densityDpi = mResources.getConfiguration().densityDpi; in testVectorDrawableSize() local
71 assertEquals(Math.round(mDpSize * densityDpi / 160f), drawable.getIntrinsicWidth()); in testVectorDrawableSize()
72 assertEquals(Math.round(mDpSize * densityDpi / 160f), drawable.getIntrinsicHeight()); in testVectorDrawableSize()
DVectorDrawableTest.java408 final int densityDpi = mResources.getConfiguration().densityDpi; in testPreloadDensity() local
410 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity()
411 verifyPreloadDensityInner(mResources, densityDpi); in testPreloadDensity()
413 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity()
419 final int densityDpi = mResources.getConfiguration().densityDpi; in testPreloadDensity_tvdpi() local
424 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity_tvdpi()
428 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument
440 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner()
444 final float approxHalf = (float)(densityDpi / 2) / densityDpi; in verifyPreloadDensityInner()
448 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner()
[all …]
DInsetDrawableTest.java441 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local
443 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity()
444 verifyPreloadDensityInner(res, densityDpi); in testPreloadDensity()
446 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity()
453 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity_tvdpi() local
458 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity_tvdpi()
462 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument
475 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner()
479 final float approxHalf = (float)(densityDpi / 2) / densityDpi; in verifyPreloadDensityInner()
484 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner()
[all …]
DAnimatedStateListDrawableTest.java175 final int densityDpi = res.getConfiguration().densityDpi; in runPreloadDensityTestForDrawable() local
177 runPreloadDensityTestForDrawableInner(res, densityDpi, drawableResId, isConstantSize); in runPreloadDensityTestForDrawable()
179 DrawableTestUtils.setResourcesDensity(res, densityDpi); in runPreloadDensityTestForDrawable()
183 private void runPreloadDensityTestForDrawableInner(Resources res, int densityDpi, in runPreloadDensityTestForDrawableInner() argument
208 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in runPreloadDensityTestForDrawableInner()
217 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in runPreloadDensityTestForDrawableInner()
226 DrawableTestUtils.setResourcesDensity(res, densityDpi); in runPreloadDensityTestForDrawableInner()
DNinePatchDrawableTest.java371 int targetDensity = mResources.getDisplayMetrics().densityDpi; in testInflate()
433 final int densityDpi = res.getConfiguration().densityDpi; in verifySetTargetDensityOuter() local
439 DrawableTestUtils.setResourcesDensity(res, densityDpi); in verifySetTargetDensityOuter()
513 dm.densityDpi = density; in testSetTargetDensity_DisplayMetrics()
521 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local
526 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity()
580 … private static NinePatchDrawable preloadedDrawable(Resources res, int densityDpi, int sourceResId) in preloadedDrawable() argument
582 DrawableTestUtils.setResourcesDensity(res, densityDpi); in preloadedDrawable()
592 final int densityDpi = res.getConfiguration().densityDpi; in testOutlinePreloadDensity() local
596 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testOutlinePreloadDensity()
[all …]
DGradientDrawableTest.java540 final int densityDpi = mResources.getConfiguration().densityDpi; in testPreloadDensity() local
542 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity()
543 verifyPreloadDensityInner(mResources, densityDpi); in testPreloadDensity()
545 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity()
551 final int densityDpi = mResources.getConfiguration().densityDpi; in testPreloadDensity_tvdpi() local
556 DrawableTestUtils.setResourcesDensity(mResources, densityDpi); in testPreloadDensity_tvdpi()
560 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument
577 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner()
581 final float approxHalf = (float)(densityDpi / 2) / densityDpi; in verifyPreloadDensityInner()
588 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner()
[all …]
DStateListDrawableTest.java197 final int densityDpi = res.getConfiguration().densityDpi; in verifyPreloadDensityTestForDrawable() local
199 … verifyPreloadDensityTestForDrawableInner(res, densityDpi, drawableResId, isConstantSize); in verifyPreloadDensityTestForDrawable()
201 DrawableTestUtils.setResourcesDensity(res, densityDpi); in verifyPreloadDensityTestForDrawable()
205 private void verifyPreloadDensityTestForDrawableInner(Resources res, int densityDpi, in verifyPreloadDensityTestForDrawableInner() argument
233 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityTestForDrawableInner()
243 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityTestForDrawableInner()
252 DrawableTestUtils.setResourcesDensity(res, densityDpi); in verifyPreloadDensityTestForDrawableInner()
DLayerDrawableTest.java1676 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local
1678 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity()
1679 verifyPreloadDensityInner(res, densityDpi); in testPreloadDensity()
1681 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity()
1688 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity_tvdpi() local
1693 DrawableTestUtils.setResourcesDensity(res, densityDpi); in testPreloadDensity_tvdpi()
1697 private void verifyPreloadDensityInner(Resources res, int densityDpi) in verifyPreloadDensityInner() argument
1724 DrawableTestUtils.setResourcesDensity(res, densityDpi / 2); in verifyPreloadDensityInner()
1728 final float approxHalf = (float)(densityDpi / 2) / densityDpi; in verifyPreloadDensityInner()
1755 DrawableTestUtils.setResourcesDensity(res, densityDpi * 2); in verifyPreloadDensityInner()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DBitmapDrawableTest.java84 final int densityDpi = res.getConfiguration().densityDpi; in testPreloadDensity() local
90 setResourcesDensity(res, densityDpi); in testPreloadDensity()
154 private static void setResourcesDensity(Resources res, int densityDpi) { in setResourcesDensity() argument
157 config.densityDpi = densityDpi; in setResourcesDensity()
/cts/tests/tests/keystore/src/android/server/am/
DProtoExtractors.java40 config.densityDpi = proto.densityDpi; in extract()
/cts/tests/framework/base/activitymanager/util/src/android/server/am/
DProtoExtractors.java40 config.densityDpi = proto.densityDpi; in extract()
/cts/tests/framework/base/activitymanager/src/android/server/am/
DActivityManagerFreeformStackTests.java110 final int densityDpi = in testActivityLifeCycleOnResizeFreeformTask() local
113 ActivityAndWindowManagersState.dpToPx(TEST_TASK_SIZE_DP_1, densityDpi); in testActivityLifeCycleOnResizeFreeformTask()
115 ActivityAndWindowManagersState.dpToPx(TEST_TASK_SIZE_DP_2, densityDpi); in testActivityLifeCycleOnResizeFreeformTask()
DActivityManagerConfigChangeTests.java140 final int densityDpi = getActivityDensityDpi(activityName, logSeparator); in testChangeFontScale() local
152 scaledPixelsToPixels(EXPECTED_FONT_SIZE_SP, fontScale, densityDpi), in testChangeFontScale()
214 private static int scaledPixelsToPixels(float sp, float fontScale, int densityDpi) { in scaledPixelsToPixels() argument
216 float f = densityDpi * (1.0f / DEFAULT_DENSITY) * fontScale * sp; in scaledPixelsToPixels()
DActivityManagerManifestLayoutTests.java151 final int densityDpi = mDisplay.getDpi(); in testLayout() local
152 expectedWidthPx = dpToPx(DEFAULT_WIDTH_DP, densityDpi); in testLayout()
153 expectedHeightPx = dpToPx(DEFAULT_HEIGHT_DP, densityDpi); in testLayout()
DActivityManagerDisplayTestBase.java88 if (config.densityDpi == dpi && config.screenWidthDp == width in getDisplayState()
223 VirtualDisplaySession setDensityDpi(int densityDpi) { in setDensityDpi() argument
224 mDensityDpi = densityDpi; in setDensityDpi()
459 if (display.mOverrideConfiguration.densityDpi == 0) { in areDisplaysValid()
DActivityManagerDisplayTests.java62 final int newDensityDpi = newDisplay.mFullConfiguration.densityDpi; in testCreateVirtualDisplayWithCustomConfig()
/cts/tests/tests/dpi/src/android/dpi/cts/
DConfigurationTest.java75 + allowedDensities, allowedDensities.contains(metrics.densityDpi)); in testScreenConfiguration()
78 (float) metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT, in testScreenConfiguration()
/cts/tests/tests/view/src/android/view/cts/
DContextThemeWrapperTest.java130 final int realDensity = mContext.getResources().getConfiguration().densityDpi; in testApplyOverrideConfiguration()
137 overrideConfig.densityDpi = expectedDensity; in testApplyOverrideConfiguration()
141 assertEquals(expectedDensity, actualConfiguration.densityDpi); in testApplyOverrideConfiguration()
/cts/tests/framework/base/activitymanager/app/src/android/server/am/
DVirtualDisplayActivity.java165 final int densityDpi = entry.extras.getInt(KEY_DENSITY_DPI, DEFAULT_DENSITY_DPI); in surfaceCreated() local
189 + densityDpi + ", canShowWithInsecureKeyguard=" + canShowWithInsecureKeyguard in surfaceCreated()
194 height, densityDpi, surface, flags); in surfaceCreated()
196 new VirtualDisplayEntry(virtualDisplay, entry.surfaceView, densityDpi, in surfaceCreated()
DFontScaleActivity.java65 final int fontActivityDpi = getResources().getDisplayMetrics().densityDpi; in dumpActivityDpi()
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/
DScreenDeviceInfo.java44 store.addResult("density_dpi", metrics.densityDpi); in collectDeviceInfo()
/cts/tests/framework/base/activitymanager/app_base/src/android/server/am/
DAbstractLifecycleLogActivity.java112 + " densityDpi=" + config.densityDpi in dumpDisplaySize()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/
DProjectionActivity.java67 … mService.startRendering(mSurface, mWidth, mHeight, metrics.densityDpi, mType.ordinal());
/cts/tests/tests/hardware/src/android/hardware/cts/
DLowRamDeviceTest.java79 int density = mDisplayMetrics.densityDpi; in testMinimumMemory()

12