/frameworks/base/tools/aapt2/configuration/ |
D | ConfigurationParser_test.cpp | 96 <screen-density-groups> 97 <screen-density-group label="large" version-code-order="2"> 98 <screen-density>xhdpi</screen-density> 99 <screen-density>xxhdpi</screen-density> 100 <screen-density>xxxhdpi</screen-density> 101 </screen-density-group> 102 <screen-density-group label="alldpi" version-code-order="1"> 103 <screen-density>ldpi</screen-density> 104 <screen-density>mdpi</screen-density> 105 <screen-density>hdpi</screen-density> [all …]
|
/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/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/base/core/java/android/util/ |
D | DisplayMetrics.java | 256 public float density; field in DisplayMetrics 333 density = o.density; in setTo() 350 density = DENSITY_DEVICE / (float) DENSITY_DEFAULT; in setToDefaults() 352 scaledDensity = density; in setToDefaults() 357 noncompatDensity = density; in setToDefaults() 394 && density == other.density in equalsPhysical() 413 return "DisplayMetrics{density=" + density + ", width=" + widthPixels + in toString()
|
/frameworks/layoutlib/bridge/src/android/graphics/ |
D | BitmapFactory_Delegate.java | 56 Density density = Density.MEDIUM; in nativeDecodeStream() local 59 density = Density.getEnum(opts.inDensity); in nativeDecodeStream() 77 density); in nativeDecodeStream() 93 bm = Bitmap_Delegate.createBitmap(is, bitmapCreateFlags, density); in nativeDecodeStream() 143 final int density = opts.inDensity; in setDensityFromOptions() local 144 if (density != 0) { in setDensityFromOptions() 145 outputBitmap.setDensity(density); in setDensityFromOptions() 147 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in setDensityFromOptions()
|
/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 bitmap = Bitmap_Delegate.createBitmap(stream, false /*isMutable*/, density); in loadIcon()
|
D | StatusBar.java | 68 public StatusBar(BridgeContext context, Density density, boolean isRtl, boolean rtlEnabled, in StatusBar() argument 103 + Config.getWifiIconType(simulatedPlatformVersion), density); in StatusBar() local 104 loadIcon(icons.get(1), "stat_sys_battery_100.png", density); in StatusBar() 110 protected ImageView loadIcon(ImageView imageView, String iconName, Density density) { in loadIcon() argument 112 return super.loadIcon(imageView, iconName, density); in loadIcon()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | ConfigurationControllerImpl.kt | 29 private var density: Int = 0 variable 40 density = currentConfig.densityDpi 63 val density = newConfig.densityDpi in onConfigurationChanged() constant 66 if (density != this.density || fontScale != this.fontScale || in onConfigurationChanged() 71 this.density = density in onConfigurationChanged()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/ |
D | DisplayDensityUtils.java | 123 final int density = ((int) (defaultDensity * (1 - (i + 1) * interval))) & ~1; in DisplayDensityUtils() local 124 if (currentDensity == density) { in DisplayDensityUtils() 128 values[curIndex] = density; in DisplayDensityUtils() 144 final int density = ((int) (defaultDensity * (1 + (i + 1) * interval))) & ~1; in DisplayDensityUtils() local 145 if (currentDensity == density) { in DisplayDensityUtils() 148 values[curIndex] = density; in DisplayDensityUtils() 237 public static void setForcedDisplayDensity(final int displayId, final int density) { in setForcedDisplayDensity() argument 242 wm.setForcedDisplayDensityForUser(displayId, density, userId); in setForcedDisplayDensity()
|
/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 | 104 public Drawable getIcon(int density) { in getIcon() argument 109 if (density != 0 && iconRes != 0) { in getIcon() 113 icon = resources.getDrawableForDensity(iconRes, density); in getIcon() 173 public Drawable getBadgedIcon(int density) { in getBadgedIcon() argument 174 Drawable originalIcon = getIcon(density); in getBadgedIcon()
|
/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/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 …]
|
D | BitmapDrawable.java | 286 public void setTargetDensity(int density) { in setTargetDensity() argument 287 if (mTargetDensity != density) { in setTargetDensity() 288 mTargetDensity = density == 0 ? DisplayMetrics.DENSITY_DEFAULT : density; in setTargetDensity() 826 if (srcDensityOverride > 0 && value.density > 0 in updateStateFromTypedArray() 827 && value.density != TypedValue.DENSITY_NONE) { in updateStateFromTypedArray() 828 if (value.density == srcDensityOverride) { in updateStateFromTypedArray() 829 value.density = r.getDisplayMetrics().densityDpi; in updateStateFromTypedArray() 831 value.density = in updateStateFromTypedArray() 832 (value.density * r.getDisplayMetrics().densityDpi) / srcDensityOverride; in updateStateFromTypedArray() 836 int density = Bitmap.DENSITY_NONE; in updateStateFromTypedArray() local [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | BitmapFactory.java | 563 final int density = value.density; in decodeResourceStream() local 564 if (density == TypedValue.DENSITY_DEFAULT) { in decodeResourceStream() 566 } else if (density != TypedValue.DENSITY_NONE) { in decodeResourceStream() 567 opts.inDensity = density; in decodeResourceStream() 699 final int density = opts.inDensity; in setDensityFromOptions() local 700 if (density != 0) { in setDensityFromOptions() 701 outputBitmap.setDensity(density); in setDensityFromOptions() 703 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in setDensityFromOptions()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | WindowManagerShellCommand.java | 178 int density; in runDisplayDensity() local 188 density = -1; in runDisplayDensity() 191 density = Integer.parseInt(densityStr); in runDisplayDensity() 196 if (density < 72) { in runDisplayDensity() 202 if (density > 0) { in runDisplayDensity() 203 mInterface.setForcedDisplayDensityForUser(displayId, density, in runDisplayDensity() 295 int density; in parseDimension() local 297 density = mInterface.getBaseDisplayDensity(displayId); in parseDimension() 299 density = DisplayMetrics.DENSITY_DEFAULT; in parseDimension() 301 return Integer.parseInt(s.substring(0, s.length() - 2)) * density / in parseDimension()
|
/frameworks/base/core/java/android/appwidget/ |
D | AppWidgetProviderInfo.java | 335 public final Drawable loadIcon(@NonNull Context context, int density) { in loadIcon() argument 336 return loadDrawable(context, density, providerInfo.getIconResource(), true); in loadIcon() 355 public final Drawable loadPreviewImage(@NonNull Context context, int density) { in loadPreviewImage() argument 356 return loadDrawable(context, density, previewImage, false); in loadPreviewImage() 418 private Drawable loadDrawable(Context context, int density, int resourceId, in loadDrawable() argument 424 if (density < 0) { in loadDrawable() 425 density = 0; in loadDrawable() 427 return resources.getDrawableForDensity(resourceId, density, null); in loadDrawable()
|
/frameworks/base/core/java/android/content/res/ |
D | ResourcesImpl.java | 205 + "x" + mMetrics.heightPixels + " " + mMetrics.density); in getDisplayMetrics() 240 void getValueForDensity(@AnyRes int id, int density, TypedValue outValue, in getValueForDensity() argument 242 boolean found = mAssets.getResourceValue(id, density, outValue, resolveRefs); in getValueForDensity() 437 mMetrics.density = in updateConfiguration() 442 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() 577 int density, @Nullable Resources.Theme theme) in loadDrawable() argument [all …]
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
D | RenderAction.java | 115 metrics.density = metrics.noncompatDensity = in init() 118 metrics.scaledDensity = metrics.noncompatScaledDensity = metrics.density; in init() 355 Density density = hardwareConfig.getDensity(); in getConfiguration() local 356 if (density == null) { in getConfiguration() 357 density = Density.MEDIUM; in getConfiguration() 360 config.screenWidthDp = hardwareConfig.getScreenWidth() * 160 / density.getDpiValue(); in getConfiguration() 361 config.screenHeightDp = hardwareConfig.getScreenHeight() * 160 / density.getDpiValue(); in getConfiguration() 368 config.densityDpi = density.getDpiValue(); in getConfiguration()
|
/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/text/ |
D | TextPaint.java | 37 public float density = 1.0f; field in TextPaint 72 density = tp.density; in set()
|
/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() 219 if (config_value->config.density != 0) { in SplitTable()
|
/frameworks/base/core/java/android/view/ |
D | ViewConfiguration.java | 386 final float density = metrics.density; in ViewConfiguration() local 389 sizeAndDensity = density * 1.5f; in ViewConfiguration() 391 sizeAndDensity = density; in ViewConfiguration() 483 final int density = (int) (100.0f * metrics.density); in get() local 485 ViewConfiguration configuration = sConfigurations.get(density); in get() 488 sConfigurations.put(density, configuration); in get()
|
/frameworks/base/libs/hwui/ |
D | FrameInfoVisualizer.cpp | 66 static int dpToPx(int dp, float density) { in dpToPx() argument 67 return (int)(dp * density + 0.5f); in dpToPx() 80 void FrameInfoVisualizer::setDensity(float density) { in setDensity() argument 81 if (CC_UNLIKELY(mDensity != density)) { in setDensity() 82 mDensity = density; in setDensity() 85 mVerticalUnit = static_cast<int>(dpToPx(PROFILE_DRAW_DP_PER_MS, density) * (float)16_ms / in setDensity() 87 mThresholdStroke = dpToPx(PROFILE_DRAW_THRESHOLD_STROKE_WIDTH, density); in setDensity()
|