Home
last modified time | relevance | path

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

12345

/frameworks/base/core/java/android/util/
DDisplayMetrics.java261 public int densityDpi; field in DisplayMetrics
334 densityDpi = o.densityDpi; in setTo()
351 densityDpi = DENSITY_DEVICE; in setToDefaults()
358 noncompatDensityDpi = densityDpi; in setToDefaults()
395 && densityDpi == other.densityDpi in equalsPhysical()
408 return widthPixels * heightPixels * densityDpi; in hashCode()
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/
DDisplaySourceService.java89 final int densityDpi = content.getInt(); in onMessageReceived() local
92 && densityDpi >= 60 && densityDpi <= 640) { in onMessageReceived()
93 handleSinkAvailable(width, height, densityDpi); in onMessageReceived()
109 private void handleSinkAvailable(int width, int height, int densityDpi) { in handleSinkAvailable() argument
111 && mSinkDensityDpi == densityDpi) { in handleSinkAvailable()
117 + ", densityDpi=" + densityDpi); in handleSinkAvailable()
121 mSinkDensityDpi = densityDpi; in handleSinkAvailable()
181 public VirtualDisplayThread(int width, int height, int densityDpi) { in VirtualDisplayThread() argument
184 mDensityDpi = densityDpi; in VirtualDisplayThread()
/frameworks/base/core/java/android/app/
DConfigurationController.java101 final int displayDensity = config.densityDpi; in applyCompatConfiguration()
160 updateDefaultDensity(config.densityDpi); in handleConfigurationChanged()
246 void updateDefaultDensity(int densityDpi) { in updateDefaultDensity() argument
248 && densityDpi != Configuration.DENSITY_DPI_UNDEFINED in updateDefaultDensity()
249 && densityDpi != DisplayMetrics.DENSITY_DEVICE) { in updateDefaultDensity()
250 DisplayMetrics.DENSITY_DEVICE = densityDpi; in updateDefaultDensity()
251 Bitmap.setDefaultDensity(densityDpi); in updateDefaultDensity()
257 return mConfiguration.densityDpi; in getCurDefaultDisplayDpi()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DWindowContextListenerControllerTests.java121 config1.densityDpi = 100; in testRegisterWindowContextListenerClientConfigPropagation()
128 assertEquals(config1.densityDpi, clientToken.mConfiguration.densityDpi); in testRegisterWindowContextListenerClientConfigPropagation()
137 config2.densityDpi = 200; in testRegisterWindowContextListenerClientConfigPropagation()
144 assertEquals(config2.densityDpi, clientToken.mConfiguration.densityDpi); in testRegisterWindowContextListenerClientConfigPropagation()
151 assertEquals(config1.densityDpi, clientToken.mConfiguration.densityDpi); in testRegisterWindowContextListenerClientConfigPropagation()
258 config1.densityDpi = 100; in testConfigUpdateForSuspendedWindowContext()
293 config1.densityDpi = 100; in testReportConfigUpdateForSuspendedWindowProviderService()
DTaskTests.java283 activityA.getConfiguration().densityDpi += 100; in testPerformClearTop()
490 parentConfig.densityDpi = DisplayMetrics.DENSITY_DEFAULT; in testFitWithinBounds()
667 parentConfig.densityDpi = 400; in testComputeConfigResourceOverrides()
668 parentConfig.screenHeightDp = (parentBounds.bottom * 160) / parentConfig.densityDpi; // 200 in testComputeConfigResourceOverrides()
669 parentConfig.screenWidthDp = (parentBounds.right * 160) / parentConfig.densityDpi; // 100 in testComputeConfigResourceOverrides()
685 parentConfig.densityDpi = 192; in testComputeConfigResourceOverrides()
716 final float density = parentConfig.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE; in testComputeConfigResourceOverrides()
735 parentConfig.densityDpi = 400; in testComputeConfigResourceLayoutOverrides()
736 parentConfig.screenHeightDp = (fullScreenBounds.bottom * 160) / parentConfig.densityDpi; in testComputeConfigResourceLayoutOverrides()
737 parentConfig.screenWidthDp = (fullScreenBounds.right * 160) / parentConfig.densityDpi; in testComputeConfigResourceLayoutOverrides()
[all …]
/frameworks/base/packages/SettingsProvider/src/android/provider/settings/backup/
DLargeScreenSettings.java45 context.getResources().getConfiguration().densityDpi); in isLargeScreen()
49 private static float dpiFromPx(float size, int densityDpi) { in dpiFromPx() argument
50 float densityRatio = (float) densityDpi / DisplayMetrics.DENSITY_DEFAULT; in dpiFromPx()
/frameworks/base/services/core/java/com/android/server/display/
DDisplayDeviceInfo.java262 public int densityDpi; field in DisplayDeviceInfo
382 densityDpi = Math.min(width, height) * DisplayMetrics.DENSITY_XHIGH / 1080; in setAssumedDensityForExternalDisplay()
385 xDpi = densityDpi; in setAssumedDensityForExternalDisplay()
386 yDpi = densityDpi; in setAssumedDensityForExternalDisplay()
421 || densityDpi != other.densityDpi in diff()
465 densityDpi = other.densityDpi; in copyFrom()
504 sb.append(", density ").append(densityDpi); in toString()
DOverlayDisplayWindow.java97 int width, int height, int densityDpi, int gravity, boolean secure, in OverlayDisplayWindow() argument
116 resize(width, height, densityDpi, false /* doLayout */); in OverlayDisplayWindow()
144 public void resize(int width, int height, int densityDpi) { in resize() argument
145 resize(width, height, densityDpi, true /* doLayout */); in resize()
148 private void resize(int width, int height, int densityDpi, boolean doLayout) { in resize() argument
151 mDensityDpi = densityDpi; in resize()
DOverlayDisplayAdapter.java215 int densityDpi = Integer.parseInt(modeMatcher.group(3), 10); in updateOverlayDisplayDevicesLocked() local
218 && densityDpi >= DisplayMetrics.DENSITY_LOW in updateOverlayDisplayDevicesLocked()
219 && densityDpi <= DisplayMetrics.DENSITY_XXXHIGH) { in updateOverlayDisplayDevicesLocked()
220 modes.add(new OverlayMode(width, height, densityDpi)); in updateOverlayDisplayDevicesLocked()
344 mInfo.densityDpi = rawMode.mDensityDpi; in getDisplayDeviceInfoLocked()
573 OverlayMode(int width, int height, int densityDpi) { in OverlayMode() argument
576 mDensityDpi = densityDpi; in OverlayMode()
DVirtualDisplayAdapter.java142 int width, int height, int densityDpi) { in resizeVirtualDisplayLocked() argument
145 device.resizeLocked(width, height, densityDpi); in resizeVirtualDisplayLocked()
386 public void resizeLocked(int width, int height, int densityDpi) { in resizeLocked() argument
387 if (mWidth != width || mHeight != height || mDensityDpi != densityDpi) { in resizeLocked()
393 mDensityDpi = densityDpi; in resizeLocked()
434 mInfo.densityDpi = mDensityDpi; in getDisplayDeviceInfoLocked()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DConfigurationControllerImplTest.kt79 config.densityDpi = 12 in configChanged_listenerNotified()
86 config.densityDpi = 20 in configChanged_listenerNotified()
91 assertThat(listener.changedConfig?.densityDpi).isEqualTo(20) in configChanged_listenerNotified()
98 config.densityDpi = 12 in densityChanged_listenerNotified()
104 config.densityDpi = 20 in densityChanged_listenerNotified()
279 config.densityDpi = 14 in multipleUpdates_listenerNotifiedOfAll()
287 config.densityDpi = 20 in multipleUpdates_listenerNotifiedOfAll()
/frameworks/base/graphics/java/android/graphics/drawable/
DDrawableWrapper.java145 final int densityDpi = r.getDisplayMetrics().densityDpi; in inflate() local
146 final int targetDensity = densityDpi == 0 ? DisplayMetrics.DENSITY_DEFAULT : densityDpi; in inflate()
173 final int densityDpi = t.getResources().getDisplayMetrics().densityDpi; in applyTheme() local
174 final int density = densityDpi == 0 ? DisplayMetrics.DENSITY_DEFAULT : densityDpi; in applyTheme()
505 density = res.getDisplayMetrics().densityDpi; in DrawableWrapperState()
DRippleComponent.java52 public final void setup(float maxRadius, int densityDpi) { in setup() argument
60 mDensityScale = densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE; in setup()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/applications/
DInterestingConfigChanges.java53 boolean densityChanged = mLastDensity != res.getDisplayMetrics().densityDpi; in applyNewConfig()
55 mLastDensity = res.getDisplayMetrics().densityDpi; in applyNewConfig()
/frameworks/base/core/java/android/content/res/
DConfiguration.java884 public int densityDpi; field in Configuration
1041 densityDpi = o.densityDpi; in setTo()
1098 if (densityDpi != DENSITY_DPI_UNDEFINED) { in toString()
1099 sb.append(" "); sb.append(densityDpi); sb.append("dpi"); in toString()
1245 protoOutputStream.write(DENSITY_DPI, densityDpi); in dumpDebug()
1401 densityDpi = protoInputStream.readInt(DENSITY_DPI); in readFromProto()
1508 densityDpi = DENSITY_DPI_UNDEFINED; in setToDefaults()
1685 if (delta.densityDpi != DENSITY_DPI_UNDEFINED && in updateFrom()
1686 densityDpi != delta.densityDpi) { in updateFrom()
1688 densityDpi = delta.densityDpi; in updateFrom()
[all …]
/frameworks/base/core/java/android/hardware/display/
DVirtualDisplayConfig.java122 @IntRange(from = 1) int densityDpi, in VirtualDisplayConfig()
139 this.mDensityDpi = densityDpi; in VirtualDisplayConfig()
273 int densityDpi = in.readInt(); in VirtualDisplayConfig() local
290 this.mDensityDpi = densityDpi; in VirtualDisplayConfig()
354 @IntRange(from = 1) int densityDpi) { in Builder()
366 mDensityDpi = densityDpi; in Builder()
DVirtualDisplay.java97 public void resize(int width, int height, int densityDpi) { in resize() argument
98 mGlobal.resizeVirtualDisplay(mToken, width, height, densityDpi); in resize()
DDisplayManager.java870 @IntRange(from = 1) int densityDpi, in createVirtualDisplay()
873 return createVirtualDisplay(name, width, height, densityDpi, surface, flags, null, null); in createVirtualDisplay()
922 @IntRange(from = 1) int densityDpi, in createVirtualDisplay()
928 height, densityDpi); in createVirtualDisplay()
944 @IntRange(from = 1) int densityDpi, in createVirtualDisplay()
951 height, densityDpi); in createVirtualDisplay()
/frameworks/base/core/tests/coretests/src/android/content/res/
DResourcesManagerTest.java58 defaultDisplayMetrics.densityDpi = DisplayMetrics.DENSITY_DEFAULT; in setUp()
64 defaultDisplayMetrics.noncompatDensityDpi = defaultDisplayMetrics.densityDpi; in setUp()
176 expectedConfig.densityDpi = mDisplayMetricsMap.get(Display.DEFAULT_DISPLAY).densityDpi; in testUpdateConfigurationUpdatesAllAssetManagers()
240 config1.densityDpi = 280; in testMultipleResourcesForOneActivityGetUpdatedWhenActivityBaseUpdates()
260 expectedConfig1.densityDpi = 280; in testMultipleResourcesForOneActivityGetUpdatedWhenActivityBaseUpdates()
268 expectedConfig2.densityDpi = 280; in testMultipleResourcesForOneActivityGetUpdatedWhenActivityBaseUpdates()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/
DBubbleIconFactory.java42 super(context, context.getResources().getConfiguration().densityDpi, in BubbleIconFactory()
54 int density = context.getResources().getConfiguration().densityDpi; in getBubbleDrawable()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/sysui/
DShellControllerTest.java227 newConfig.densityDpi = 200; in testAddConfigurationChangeListener_ensureCallback()
238 newConfig.densityDpi = 200; in testDoubleAddConfigurationChangeListener_ensureSingleCallback()
249 newConfig.densityDpi = 200; in testAddRemoveConfigurationChangeListener_ensureNoCallback()
261 newConfig.densityDpi = 200; in testMultipleConfigurationChangeListeners()
280 newConfig.densityDpi = 200; in testRemoveListenerDuringCallback()
289 newConfig.densityDpi = 200; in testDensityChangeCallback()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/appselector/view/
DTaskPreviewSizeProviderTest.kt119 val densityDpi = minDimension * DENSITY_DEFAULT / targetSmallestWidthDpi in givenDisplay() constant
122 configuration.densityDpi = densityDpi in givenDisplay()
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/
DUtilities.java145 context.getResources().getConfiguration().densityDpi); in isLargeScreen()
149 public static float dpiFromPx(float size, int densityDpi) { in dpiFromPx() argument
150 float densityRatio = (float) densityDpi / DisplayMetrics.DENSITY_DEFAULT; in dpiFromPx()
/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/core/java/android/inputmethodservice/navigationbar/
DNavigationBarView.java172 final boolean densityChange = oldConfig.densityDpi != mConfiguration.densityDpi; in updateIcons()
346 if (mTmpLastConfiguration.densityDpi != mConfiguration.densityDpi in onConfigurationChanged()

12345