Home
last modified time | relevance | path

Searched refs:getDisplayMetrics (Results 1 – 25 of 243) sorted by relevance

12345678910

/frameworks/base/core/tests/coretests/src/android/content/res/
DResourcesManagerTest.java86 protected DisplayMetrics getDisplayMetrics(int displayId, DisplayAdjustments daj) { in setUp()
298 activityResources.getDisplayMetrics().widthPixels); in testChangingActivityDisplayDoesntOverrideDisplayRequestedByResources()
300 activityResources.getDisplayMetrics().heightPixels); in testChangingActivityDisplayDoesntOverrideDisplayRequestedByResources()
302 defaultDisplayResources.getDisplayMetrics().widthPixels); in testChangingActivityDisplayDoesntOverrideDisplayRequestedByResources()
304 defaultDisplayResources.getDisplayMetrics().widthPixels); in testChangingActivityDisplayDoesntOverrideDisplayRequestedByResources()
311 activityResources.getDisplayMetrics().widthPixels); in testChangingActivityDisplayDoesntOverrideDisplayRequestedByResources()
313 activityResources.getDisplayMetrics().heightPixels); in testChangingActivityDisplayDoesntOverrideDisplayRequestedByResources()
315 defaultDisplayResources.getDisplayMetrics().widthPixels); in testChangingActivityDisplayDoesntOverrideDisplayRequestedByResources()
317 defaultDisplayResources.getDisplayMetrics().widthPixels); in testChangingActivityDisplayDoesntOverrideDisplayRequestedByResources()
DConfigurationBoundResourceCacheTest.java91 float staticDim = TypedValue.complexToDimension(staticValue.data, res.getDisplayMetrics()); in testVoidConfigChange()
114 res.getDisplayMetrics()); in testEffectiveConfigChange()
139 float staticDim = TypedValue.complexToDimension(staticValue.data, res.getDisplayMetrics()); in testConfigChangeMultipleResources()
141 res.getDisplayMetrics()); in testConfigChangeMultipleResources()
177 .complexToDimension(staticValues[i].data, res.getDisplayMetrics()); in testConfigChangeMultipleThemes()
182 res.getDisplayMetrics()); in testConfigChangeMultipleThemes()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/qrcode/
DQrDecorateView.java73 getResources().getDisplayMetrics()); in QrDecorateView()
76 CORNER_RADIUS - CORNER_STROKE_WIDTH, getResources().getDisplayMetrics()); in QrDecorateView()
127 CORNER_LINE_LENGTH, getResources().getDisplayMetrics()) / 2; in calculateFramePos()
129 CORNER_STROKE_WIDTH, getResources().getDisplayMetrics()); in calculateFramePos()
/frameworks/base/core/java/com/android/internal/widget/
DNotificationMaxHeightFrameLayout.java77 final float factor = Math.max(1.0f, context.getResources().getDisplayMetrics().scaledDensity in getFontScaledHeight()
78 / context.getResources().getDisplayMetrics().density); in getFontScaledHeight()
/frameworks/base/apct-tests/perftests/core/src/android/app/
DResourcesManagerPerfTest.java140 public void getDisplayMetrics() { in getDisplayMetrics() method in ResourcesManagerPerfTest
152 resourcesManager.getDisplayMetrics(); in getDisplayMetrics()
153 resourcesManager.getDisplayMetrics(); in getDisplayMetrics()
/frameworks/base/tests/WallpaperTest/src/com/example/wallpapertest/
DTestWallpaper.java107 tpaint.density = getResources().getDisplayMetrics().density; in onCreate()
110 tpaint.setTextSize(18 * getResources().getDisplayMetrics().scaledDensity); in onCreate()
111 tpaint.setShadowLayer(4 * getResources().getDisplayMetrics().density, 0, 0, 0xff000000); in onCreate()
115 mPadding = (int)(16 * getResources().getDisplayMetrics().density); in onCreate()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/
DExitDesktopTaskTransitionHandlerTest.java89 doReturn(mDisplayMetrics).when(mResources).getDisplayMetrics(); in setUp()
90 when(mResources.getDisplayMetrics()) in setUp()
91 .thenReturn(getContext().getResources().getDisplayMetrics()); in setUp()
/frameworks/base/rs/java/android/renderscript/
DFont.java165 int dpi = res.getDisplayMetrics().densityDpi; in createFromFile()
189 int dpi = res.getDisplayMetrics().densityDpi; in createFromAsset()
213 int dpi = res.getDisplayMetrics().densityDpi; in createFromResource()
/frameworks/base/tests/UiBench/src/com/android/test/uibench/
DSlowNestedRecyclerViewActivity.java53 innerItemWidth = (int) (resources.getDisplayMetrics().widthPixels / 3.3f); in SizeData()
55 headerHeight = (int) (resources.getDisplayMetrics().heightPixels * 0.5f); in SizeData()
81 final float density = parent.getResources().getDisplayMetrics().density; in onCreateViewHolder()
/frameworks/base/core/java/android/accessibilityservice/util/
DAccessibilityUtils.java123 resources.getDisplayMetrics())); in getScreenWidthPixels()
137 resources.getDisplayMetrics())); in getScreenHeightPixels()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DNotificationUtils.java74 float factor = Math.max(1.0f, context.getResources().getDisplayMetrics().scaledDensity / in getFontScaledHeight()
75 context.getResources().getDisplayMetrics().density); in getFontScaledHeight()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/
DPipDisplayLayoutState.java72 : new Point(dpToPx(screenEdgeInsetsDp.getWidth(), res.getDisplayMetrics()), in reloadResources()
73 dpToPx(screenEdgeInsetsDp.getHeight(), res.getDisplayMetrics())); in reloadResources()
/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/
DGlobalActionsPopupMenu.java95 int parentWidth = res.getSystem().getDisplayMetrics().widthPixels; in show()
96 float parentDensity = res.getSystem().getDisplayMetrics().density; in show()
/frameworks/base/core/java/android/inputmethodservice/navigationbar/
DNavigationBarUtils.java40 return (int) TypedValue.applyDimension(COMPLEX_UNIT_DIP, dpValue, res.getDisplayMetrics()); in dpToPx()
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/
DSelectablePreference.java33 context.getResources().getDisplayMetrics()); in SelectablePreference()
/frameworks/base/services/core/java/com/android/server/input/
DFocusEventDebugView.java80 final var dm = mContext.getResources().getDisplayMetrics(); in FocusEventDebugView()
247 final var dm = c.getResources().getDisplayMetrics(); in PressedKeyView()
289 final var dm = c.getResources().getDisplayMetrics(); in PressedKeyContainer()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/
DTvSplitMenuController.java88 mContext.getResources().getDisplayMetrics().widthPixels, in addSplitMenuViewToSystemWindows()
89 mContext.getResources().getDisplayMetrics().heightPixels, in addSplitMenuViewToSystemWindows()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DRotationActivity.java39 return (int) (c.getResources().getDisplayMetrics().density * dip + 0.5f); in dipToPx()
DDrawIntoHwBitmapActivity.java43 p.setTextSize(20 * getResources().getDisplayMetrics().density); in createBitmap()
/frameworks/opt/bitmap/sample/src/com/example/bitmapsample/
DBitmapView.java38 mDensity = getResources().getDisplayMetrics().density; in BitmapView()
/frameworks/opt/setupwizard/library/gingerbread/test/robotest/src/com/android/setupwizardlib/util/
DDimensionConsistencyTest.java62 DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics(); in dp2Px()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/
DPhoneSizeSpecSourceTest.java145 when(mResources.getDisplayMetrics()) in setUp()
146 .thenReturn(getContext().getResources().getDisplayMetrics()); in setUp()
/frameworks/base/tests/UiBench/src/com/android/test/uibench/leanback/
DTestHelper.java108 DisplayMetrics dm = mContext.getResources().getDisplayMetrics(); in build()
230 DisplayMetrics metrics = activity.getResources().getDisplayMetrics(); in initBackground()
/frameworks/base/packages/SystemUI/src/com/android/systemui/people/
DPeopleStoryIconFactory.java57 mIconBitmapSize = (int) (iconSizeDp * mContext.getResources().getDisplayMetrics().density); in PeopleStoryIconFactory()
58 mDensity = mContext.getResources().getDisplayMetrics().density; in PeopleStoryIconFactory()
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/
DIllustrationTest.java48 context.getResources().getDisplayMetrics().density = 2.0f; in testAspectRatio()

12345678910