/frameworks/base/tools/aapt2/configuration/ |
D | ConfigurationParser_test.cpp | 77 <screen-density-groups> 78 <screen-density-group label="large" version-code-order="2"> 79 <screen-density>xhdpi</screen-density> 80 <screen-density>xxhdpi</screen-density> 81 <screen-density>xxxhdpi</screen-density> 82 </screen-density-group> 83 <screen-density-group label="alldpi" version-code-order="1"> 84 <screen-density>ldpi</screen-density> 85 <screen-density>mdpi</screen-density> 86 <screen-density>hdpi</screen-density> [all …]
|
/frameworks/base/services/core/java/com/android/server/display/ |
D | DensityMapping.java | 76 return left.density; in getDensityForResolution() 90 return (int) Math.round((diagonal - leftDiagonal) * (right.density - left.density) in getDensityForResolution() 91 / (rightDiagonal - leftDiagonal) + left.density); in getDensityForResolution() 106 } else if (prev.density > curr.density) { in verifyDensityMapping() 124 public final int density; field in DensityMapping.Entry 126 Entry(int width, int height, int density) { in Entry() argument 128 this.density = density; in Entry() 135 + ", density=" + density + '}'; in toString()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/battery/ |
D | AccessorizedBatteryDrawableTest.kt | 35 val density = context.resources.displayMetrics.density in intrinsicSize_shieldFalse_isBatterySize() constant 36 assertThat(drawable.intrinsicHeight).isEqualTo((BATTERY_HEIGHT * density).toInt()) in intrinsicSize_shieldFalse_isBatterySize() 37 assertThat(drawable.intrinsicWidth).isEqualTo((BATTERY_WIDTH * density).toInt()) in intrinsicSize_shieldFalse_isBatterySize() 45 val density = context.resources.displayMetrics.density in intrinsicSize_shieldTrue_isBatteryPlusShieldSize() constant 47 .isEqualTo((BATTERY_HEIGHT_WITH_SHIELD * density).toInt()) in intrinsicSize_shieldTrue_isBatteryPlusShieldSize() 48 assertThat(drawable.intrinsicWidth).isEqualTo((BATTERY_WIDTH_WITH_SHIELD * density).toInt()) in intrinsicSize_shieldTrue_isBatteryPlusShieldSize()
|
/frameworks/layoutlib/bridge/ |
D | update_nav_icons.sh | 38 for density in $DENSITIES 40 destination="$BARS/v$CURRENT_API/$density/" 42 cp -v "$FB/packages/SystemUI/res/drawable-$density/$icon" "$destination" 45 for density in $DENSITIES 47 destination="$BARS/v$CURRENT_API/ldrtl-$density/" 49 cp -v "$FB/packages/SystemUI/res/drawable-ldrtl-$density/$icon" "$destination"
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/resources/ |
D | IconLoader.java | 35 public IconLoader(String iconName, Density density, int platformVersion, LayoutDirection in IconLoader() argument 38 mDesiredDensity = density; in IconLoader() 85 for (Density density : Density.values()) { in getIcon() 86 if (density == mDesiredDensity) { in getIcon() 90 stream = getIcon(resourceDir, density); in getIcon() 92 mCurrentDensity = density; in getIcon() 103 private InputStream getIcon(String resourceDir, Density density) { in getIcon() argument 112 .append(density.getResourceValue()) in getIcon() 122 .append(density.getResourceValue()) in getIcon()
|
/frameworks/base/core/java/android/util/ |
D | DisplayMetrics.java | 276 public float density; field in DisplayMetrics 368 density = o.density; in setTo() 386 density = DENSITY_DEVICE / (float) DENSITY_DEFAULT; in setToDefaults() 388 scaledDensity = density; in setToDefaults() 393 noncompatDensity = density; in setToDefaults() 431 && density == other.density in equalsPhysical() 450 return "DisplayMetrics{density=" + density + ", width=" + widthPixels + in toString()
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ |
D | NavigationBar.java | 44 public NavigationBar(BridgeContext context, Density density, int orientation, boolean isRtl, in NavigationBar() argument 46 this(context, density, orientation, isRtl, rtlEnabled, simulatedPlatformVersion, in NavigationBar() 50 protected NavigationBar(BridgeContext context, Density density, int orientation, boolean isRtl, in NavigationBar() argument 72 density, isRtl); in NavigationBar() 75 density, in NavigationBar() 79 loadIcon(recent, "ic_sysbar_recent.png", density, isRtl); in NavigationBar() 102 size *= context.getMetrics().density; in setSize() 136 sw /= metrics.density; in getShortestWidth()
|
D | CustomBar.java | 91 protected ImageView loadIcon(ImageView imageView, String iconName, Density density) { in loadIcon() argument 93 density, false); in loadIcon() 96 protected ImageView loadIcon(int index, String iconName, Density density, boolean isRtl) { in loadIcon() argument 101 density, isRtl); in loadIcon() 107 protected ImageView loadIcon(ImageView imageView, String iconName, Density density, in loadIcon() argument 110 IconLoader iconLoader = new IconLoader(iconName, density, mSimulatedPlatformVersion, dir); in loadIcon() 114 density = iconLoader.getDensity(); in loadIcon() 120 options.inDensity = density.getDpiValue(); in loadIcon()
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | TypedValueTest.kt | 149 metrics.density = 3.25f in <lambda>() 151 val height = 52 * metrics.density in <lambda>() 154 widthFloat / metrics.density, in <lambda>() 166 metrics.density = 1f in <lambda>() 168 metrics.scaledDensity = fontScale * metrics.density in <lambda>() 186 metrics.density = 1f in <lambda>() 188 metrics.scaledDensity = fontScale * metrics.density in <lambda>() 199 metrics.density = 1f in <lambda>() 201 metrics.scaledDensity = fontScale * metrics.density in <lambda>() 211 metrics.density = 1f in <lambda>() [all …]
|
/frameworks/base/services/autofill/java/com/android/server/autofill/ui/ |
D | BottomSheetLayout.java | 97 + " screenHeight: " + screenHeight / displayMetrics.density + ", screenWidth: " in onMeasure() 98 + screenWidth / displayMetrics.density in onMeasure() 99 + ", maxHeight: " + maxHeight / displayMetrics.density in onMeasure() 100 + ", maxWidth: " + maxWidth / displayMetrics.density + ", getMeasuredWidth(): " in onMeasure() 101 + getMeasuredWidth() / displayMetrics.density + ", getMeasuredHeight(): " in onMeasure() 102 + getMeasuredHeight() / displayMetrics.density); in onMeasure()
|
/frameworks/base/tools/aapt/tests/ |
D | ResourceFilter_test.cpp | 35 config.density = 320; in TEST() 50 config.density = 320; in TEST() 73 config.density = 320; in TEST() 168 config.density = 160; in TEST() 176 expectedConfig.density = 160; in TEST() 184 config.density = 160; in TEST() 189 config.density = 480; in TEST() 197 expectedConfig.density = 160; in TEST()
|
/frameworks/base/core/java/android/content/pm/ |
D | LauncherActivityInfo.java | 99 public Drawable getIcon(int density) { in getIcon() argument 104 if (density != 0 && iconRes != 0) { in getIcon() 108 icon = resources.getDrawableForDensity(iconRes, density); in getIcon() 178 public Drawable getBadgedIcon(int density) { in getBadgedIcon() argument 179 Drawable originalIcon = getIcon(density); in getBadgedIcon()
|
/frameworks/base/core/tests/coretests/src/android/content/res/ |
D | FontScaleConverterActivityTest.java | 87 densityRef.compareAndSet(null, activity.getResources().getDisplayMetrics().density); in testFontsScaleNonLinearly() 89 var density = densityRef.get(); in testFontsScaleNonLinearly() local 90 assertThat(density).isNotNull(); in testFontsScaleNonLinearly() 93 15f * density, in testFontsScaleNonLinearly() 94 16f * density in testFontsScaleNonLinearly() 97 20f * density, in testFontsScaleNonLinearly() 98 36f * density in testFontsScaleNonLinearly() 101 35 * density, in testFontsScaleNonLinearly() 102 60 * density in testFontsScaleNonLinearly()
|
/frameworks/base/core/java/android/view/ |
D | WindowMetrics.java | 80 public WindowMetrics(@NonNull Rect bounds, @NonNull WindowInsets windowInsets, float density) { in WindowMetrics() argument 83 mDensity = density; in WindowMetrics() 95 float density) { in WindowMetrics() argument 98 mDensity = density; in WindowMetrics()
|
/frameworks/base/tests/SilkFX/src/com/android/test/silkfx/common/ |
D | BaseDrawingView.kt | 33 val density: Float constant in com.android.test.silkfx.common.BaseDrawingView 43 density = resources.displayMetrics.density 44 dp = { this * density } in <lambda>()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | ConfigurationControllerImpl.kt | 32 private var density: Int = 0 variable 47 density = currentConfig.densityDpi 73 val density = newConfig.densityDpi in onConfigurationChanged() constant 76 if (density != this.density || fontScale != this.fontScale || in onConfigurationChanged() 81 this.density = density in onConfigurationChanged()
|
/frameworks/base/core/java/android/preference/ |
D | PreferenceFrameLayout.java | 64 float density = context.getResources().getDisplayMetrics().density; in PreferenceFrameLayout() local 65 int defaultBorderTop = (int) (density * DEFAULT_BORDER_TOP + 0.5f); in PreferenceFrameLayout() 66 int defaultBottomPadding = (int) (density * DEFAULT_BORDER_BOTTOM + 0.5f); in PreferenceFrameLayout() 67 int defaultLeftPadding = (int) (density * DEFAULT_BORDER_LEFT + 0.5f); in PreferenceFrameLayout() 68 int defaultRightPadding = (int) (density * DEFAULT_BORDER_RIGHT + 0.5f); in PreferenceFrameLayout()
|
/frameworks/base/packages/SystemUI/compose/core/src/com/android/compose/animation/scene/ |
D | SceneTransitionLayout.kt | 51 val density = LocalDensity.current constant 58 density, in <lambda>() 64 layoutImpl.density = density
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | AnimatedImageDrawable.java | 213 if (srcDensityOverride > 0 && value.density > 0 in updateStateFromTypedArray() 214 && value.density != TypedValue.DENSITY_NONE) { in updateStateFromTypedArray() 215 if (value.density == srcDensityOverride) { in updateStateFromTypedArray() 216 value.density = r.getDisplayMetrics().densityDpi; in updateStateFromTypedArray() 218 value.density = in updateStateFromTypedArray() 219 (value.density * r.getDisplayMetrics().densityDpi) / srcDensityOverride; in updateStateFromTypedArray() 223 int density = Bitmap.DENSITY_NONE; in updateStateFromTypedArray() local 224 if (value.density == TypedValue.DENSITY_DEFAULT) { in updateStateFromTypedArray() 225 density = DisplayMetrics.DENSITY_DEFAULT; in updateStateFromTypedArray() 226 } else if (value.density != TypedValue.DENSITY_NONE) { in updateStateFromTypedArray() [all …]
|
/frameworks/base/core/java/android/text/ |
D | TextPaint.java | 37 public float density = 1.0f; field in TextPaint 72 density = tp.density; in set()
|
/frameworks/base/graphics/java/android/graphics/ |
D | BitmapFactory.java | 576 final int density = value.density; in decodeResourceStream() local 577 if (density == TypedValue.DENSITY_DEFAULT) { in decodeResourceStream() 579 } else if (density != TypedValue.DENSITY_NONE) { in decodeResourceStream() 580 opts.inDensity = density; in decodeResourceStream() 712 final int density = opts.inDensity; in setDensityFromOptions() local 713 if (density != 0) { in setDensityFromOptions() 714 outputBitmap.setDensity(density); in setDensityFromOptions() 716 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in setDensityFromOptions()
|
/frameworks/base/tests/VoiceInteraction/src/com/android/test/voiceinteraction/ |
D | AssistVisualizer.java | 81 float density = getResources().getDisplayMetrics().density; in AssistVisualizer() local 82 mFramePaint.setShadowLayer(density, density, density, 0xff000000); in AssistVisualizer() 86 mFrameNoTransformPaint.setShadowLayer(density, density, density, 0xff000000); in AssistVisualizer()
|
/frameworks/base/core/java/android/window/ |
D | WindowMetricsController.java | 81 final float density; in getWindowMetricsInternal() local 91 density = config.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE; in getWindowMetricsInternal() 98 return new WindowMetrics(new Rect(bounds), insetsSupplier, density); in getWindowMetricsInternal() 168 final float density = currentDisplayInfo.logicalDensityDpi in getPossibleMaximumWindowMetrics() local 170 maxMetrics.add(new WindowMetrics(maxBounds, windowInsets, density)); in getPossibleMaximumWindowMetrics()
|
/frameworks/base/tools/aapt2/split/ |
D | TableSplitter.cpp | 42 without_density.density = 0; in CopyWithoutDensity() 53 if (config.density == 0) { in SplitValueSelector() 56 density_dependent_config_to_density_map_[CopyWithoutDensity(config)] = config.density; in SplitValueSelector() 70 if (config_value->config.density == 0 && !entry.second) { in SelectValues() 94 target_density.density = density_value_iter->second; in SelectValues() 138 target_density.density = preferred_density; in MarkNonPreferredDensitiesAsClaimed() 217 if (config_value->config.density != 0) { in SplitTable()
|
/frameworks/base/core/java/android/content/res/ |
D | ResourcesImpl.java | 198 + "x" + mMetrics.heightPixels + " " + mMetrics.density); in getDisplayMetrics() 237 void getValueForDensity(@AnyRes int id, int density, TypedValue outValue, in getValueForDensity() argument 239 boolean found = mAssets.getResourceValue(id, density, outValue, resolveRefs); in getValueForDensity() 434 mMetrics.density = in updateConfiguration() 439 mMetrics.scaledDensity = mMetrics.density * in updateConfiguration() 514 int density = config.densityDpi; in calcConfigChanges() local 515 if (density == Configuration.DENSITY_DPI_UNDEFINED) { in calcConfigChanges() 516 density = mMetrics.noncompatDensityDpi; in calcConfigChanges() 519 mDisplayAdjustments.getCompatibilityInfo().applyToConfiguration(density, mTmpConfig); in calcConfigChanges() 608 int density, @Nullable Resources.Theme theme) in loadDrawable() argument [all …]
|