/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/android/ |
D | Bootstrap.java | 14 public static void setUpDisplay(Configuration configuration, DisplayMetrics displayMetrics) { in setUpDisplay() argument 16 ShadowWindowManagerImpl.configureDefaultDisplayForJBOnly(configuration, displayMetrics); in setUpDisplay() 18 ShadowDisplayManager.configureDefaultDisplay(configuration, displayMetrics); in setUpDisplay() 23 Configuration configuration, DisplayMetrics displayMetrics) { in applyQualifiers() argument 47 DeviceConfig.applyToConfiguration(qualifiers, apiLevel, configuration, displayMetrics); in applyQualifiers() 50 DeviceConfig.applyRules(configuration, displayMetrics, apiLevel); in applyQualifiers() 52 fixJellyBean(configuration, displayMetrics); in applyQualifiers() 55 private static void fixJellyBean(Configuration configuration, DisplayMetrics displayMetrics) { in fixJellyBean() argument 57 int widthPx = (int) (configuration.screenWidthDp * displayMetrics.density); in fixJellyBean() 58 int heightPx = (int) (configuration.screenHeightDp * displayMetrics.density); in fixJellyBean() [all …]
|
D | DeviceConfig.java | 98 Configuration configuration, DisplayMetrics displayMetrics) { in applyToConfiguration() argument 196 setDensity(resTab.density, apiLevel, configuration, displayMetrics); in applyToConfiguration() 231 DisplayMetrics displayMetrics) { in setDensity() argument 235 displayMetrics.densityDpi = densityDpi; in setDensity() 236 displayMetrics.density = displayMetrics.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE; in setDensity() 243 static void applyRules(Configuration configuration, DisplayMetrics displayMetrics, int apiLevel) { in applyRules() argument 333 switch (displayMetrics.densityDpi) { in applyRules() 340 setDensity(DEFAULT_DENSITY, apiLevel, configuration, displayMetrics); in applyRules()
|
D | ConfigurationV25.java | 70 …public static String resourceQualifierString(Configuration config, DisplayMetrics displayMetrics) { in resourceQualifierString() argument 71 return resourceQualifierString(config, displayMetrics, true); in resourceQualifierString() 74 …public static String resourceQualifierString(Configuration config, DisplayMetrics displayMetrics, … in resourceQualifierString() argument 228 densityDpi = displayMetrics.densityDpi; in resourceQualifierString()
|
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/android/ |
D | BootstrapTest.java | 63 private DisplayMetrics displayMetrics; field in BootstrapTest 69 displayMetrics = new DisplayMetrics(); in setUp() 105 DisplayMetrics displayMetrics = in shouldSetUpRealisticDisplay() local 107 assertThat(displayMetrics.widthPixels).isEqualTo(480); in shouldSetUpRealisticDisplay() 108 assertThat(displayMetrics.heightPixels).isEqualTo(640); in shouldSetUpRealisticDisplay() 140 DisplayMetrics displayMetrics = in shouldSetUpRealisticDisplay_landscapeHighDensity() local 142 assertThat(displayMetrics.widthPixels).isEqualTo(960); in shouldSetUpRealisticDisplay_landscapeHighDensity() 143 assertThat(displayMetrics.heightPixels).isEqualTo(720); in shouldSetUpRealisticDisplay_landscapeHighDensity() 148 Bootstrap.applyQualifiers("", Build.VERSION.RESOURCES_SDK_INT, configuration, displayMetrics); in applyQualifiers_shouldAddDefaults() 149 String outQualifiers = ConfigurationV25.resourceQualifierString(configuration, displayMetrics); in applyQualifiers_shouldAddDefaults() [all …]
|
D | DeviceConfigTest.java | 22 private DisplayMetrics displayMetrics; field in DeviceConfigTest 29 displayMetrics = new DisplayMetrics(); in setUp() 69 DeviceConfig.applyRules(configuration, displayMetrics, apiLevel); in applyRules_defaults() 79 DeviceConfig.applyRules(configuration, displayMetrics, apiLevel); in applyRules_rtlScript() 88 DeviceConfig.applyRules(configuration, displayMetrics, apiLevel); in applyRules_heightWidth() 97 DeviceConfig.applyRules(configuration, displayMetrics, apiLevel); in applyRules_heightWidthOrientation() 106 DeviceConfig.applyRules(configuration, displayMetrics, apiLevel); in applyRules_sizeToDimens() 115 DeviceConfig.applyRules(configuration, displayMetrics, apiLevel); in applyRules_sizeFromDimens() 124 DeviceConfig.applyRules(configuration, displayMetrics, apiLevel); in applyRules_longIncreasesHeight() 133 DeviceConfig.applyRules(configuration, displayMetrics, apiLevel); in applyRules_greatHeightTriggersLong() [all …]
|
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/ |
D | ShadowDisplayManager.java | 40 …c static void configureDefaultDisplay(Configuration configuration, DisplayMetrics displayMetrics) { in configureDefaultDisplay() argument 46 shadowDisplayManagerGlobal.addDisplay(createDisplayInfo(configuration, displayMetrics)); in configureDefaultDisplay() 49 … static DisplayInfo createDisplayInfo(Configuration configuration, DisplayMetrics displayMetrics) { in createDisplayInfo() argument 50 int widthPx = (int) (configuration.screenWidthDp * displayMetrics.density); in createDisplayInfo() 51 int heightPx = (int) (configuration.screenHeightDp * displayMetrics.density); in createDisplayInfo() 73 displayInfo.logicalDensityDpi = displayMetrics.densityDpi; in createDisplayInfo() 74 displayInfo.physicalXDpi = displayMetrics.densityDpi; in createDisplayInfo() 75 displayInfo.physicalYDpi = displayMetrics.densityDpi; in createDisplayInfo() 81 displayInfo.getAppMetrics(displayMetrics); in createDisplayInfo() 99 DisplayMetrics displayMetrics = new DisplayMetrics(); in createDisplayInfo() local [all …]
|
D | ShadowDisplay.java | 399 void configureForJBOnly(Configuration configuration, DisplayMetrics displayMetrics) { in configureForJBOnly() argument 400 int widthPx = (int) (configuration.screenWidthDp * displayMetrics.density); in configureForJBOnly() 401 int heightPx = (int) (configuration.screenHeightDp * displayMetrics.density); in configureForJBOnly() 409 densityDpi = displayMetrics.densityDpi; in configureForJBOnly() 410 xdpi = (float) displayMetrics.densityDpi; in configureForJBOnly() 411 ydpi = (float) displayMetrics.densityDpi; in configureForJBOnly() 412 scaledDensity = displayMetrics.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE; in configureForJBOnly()
|
D | ShadowWindowManagerImpl.java | 34 Configuration configuration, DisplayMetrics displayMetrics) { in configureDefaultDisplayForJBOnly() argument 42 shadowDisplay.configureForJBOnly(configuration, displayMetrics); in configureDefaultDisplayForJBOnly()
|
D | ShadowBitmap.java | 199 DisplayMetrics displayMetrics, in createBitmap() argument 209 DisplayMetrics displayMetrics, int width, int height, Bitmap.Config config) { in createBitmap() argument 221 if (displayMetrics != null) { in createBitmap() 222 shadowBitmap.density = displayMetrics.densityDpi; in createBitmap()
|
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/ |
D | RuntimeEnvironment.java | 108 public static String getQualifiers(Configuration configuration, DisplayMetrics displayMetrics) { in getQualifiers() argument 109 return ConfigurationV25.resourceQualifierString(configuration, displayMetrics); in getQualifiers() 123 DisplayMetrics displayMetrics = new DisplayMetrics(); in setQualifiers() local 126 displayMetrics.setTo(Resources.getSystem().getDisplayMetrics()); in setQualifiers() 130 Bootstrap.applyQualifiers(newQualifiers, getApiLevel(), configuration, displayMetrics); in setQualifiers() 133 systemResources.updateConfiguration(configuration, displayMetrics); in setQualifiers() 136 application.getResources().updateConfiguration(configuration, displayMetrics); in setQualifiers()
|
/external/glide/library/src/main/java/com/bumptech/glide/load/engine/cache/ |
D | MemorySizeCalculator.java | 95 private final DisplayMetrics displayMetrics; field in MemorySizeCalculator.DisplayMetricsScreenDimensions 97 public DisplayMetricsScreenDimensions(DisplayMetrics displayMetrics) { in DisplayMetricsScreenDimensions() argument 98 this.displayMetrics = displayMetrics; in DisplayMetricsScreenDimensions() 103 return displayMetrics.widthPixels; in getWidthPixels() 108 return displayMetrics.heightPixels; in getHeightPixels()
|
/external/deqp/framework/platform/android/ |
D | tcuAndroidUtil.cpp | 488 ScreenClass getScreenClass (const DisplayMetrics& displayMetrics) in getScreenClass() argument 504 const float dpScale = float(displayMetrics.densityDpi) / 160.f; in getScreenClass() 507 const int widthP = de::max(displayMetrics.widthPixels, displayMetrics.heightPixels); in getScreenClass() 508 const int heightP = de::min(displayMetrics.widthPixels, displayMetrics.heightPixels); in getScreenClass() 546 DensityClass getDensityClass (const DisplayMetrics& displayMetrics) in getDensityClass() argument 548 if (isValidDensityClass(displayMetrics.densityDpi)) in getDensityClass() 549 return (DensityClass)displayMetrics.densityDpi; in getDensityClass() 608 const DisplayMetrics displayMetrics = getDisplayMetrics(activity); in getCDDRequiredSystemMemory() local 609 const ScreenClass screenClass = getScreenClass(displayMetrics); in getCDDRequiredSystemMemory() 624 const DensityClass densityClass = getDensityClass(displayMetrics); in getCDDRequiredSystemMemory()
|
/external/robolectric-shadows/robolectric/src/main/java/org/robolectric/android/internal/ |
D | ParallelUniverse.java | 106 DisplayMetrics displayMetrics = new DisplayMetrics(); in setUpApplicationState() local 109 displayMetrics); in setUpApplicationState() local 180 Bootstrap.setUpDisplay(configuration, displayMetrics); in setUpApplicationState() 184 systemResources.updateConfiguration(configuration, displayMetrics); in setUpApplicationState() 237 appResources.updateConfiguration(configuration, displayMetrics); in setUpApplicationState()
|
/external/tensorflow/tensorflow/examples/android/src/org/tensorflow/demo/ |
D | StylizeActivity.java | 393 DisplayMetrics displayMetrics = new DisplayMetrics(); in onPreviewSizeChosen() local 394 getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); in onPreviewSizeChosen() 395 int styleSelectorHeight = displayMetrics.heightPixels; in onPreviewSizeChosen() 396 int styleSelectorWidth = displayMetrics.widthPixels - styleSelectorHeight; in onPreviewSizeChosen()
|
/external/setupcompat/partnerconfig/java/com/google/android/setupcompat/partnerconfig/ |
D | PartnerConfigHelper.java | 364 DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); in getDimensionFromTypedValue() local 365 return value.getDimension(displayMetrics); in getDimensionFromTypedValue()
|