/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ |
D | IconLoader.java | 34 IconLoader(String iconName, Density density, int platformVersion, LayoutDirection direction) { in IconLoader() argument 36 mDesiredDensity = density; in IconLoader() 83 for (Density density : Density.values()) { in getIcon() 84 if (density == mDesiredDensity) { in getIcon() 88 stream = getIcon(resourceDir, density); in getIcon() 90 mCurrentDensity = density; in getIcon() 101 private InputStream getIcon(String resourceDir, Density density) { in getIcon() argument 110 .append(density.getResourceValue()) in getIcon() 120 .append(density.getResourceValue()) in getIcon()
|
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 70 loadIcon(back, "ic_sysbar_back.png", density, isRtl); in NavigationBar() 72 loadIcon(3, "ic_sysbar_home.png", density, isRtl); in NavigationBar() 74 loadIcon(recent, "ic_sysbar_recent.png", density, isRtl); in NavigationBar() 96 size *= context.getMetrics().density; in setSize() 130 sw /= metrics.density; in getShortestWidth()
|
D | StatusBar.java | 64 public StatusBar(BridgeContext context, Density density, boolean isRtl, boolean rtlEnabled, in StatusBar() argument 82 + Config.getWifiIconType(simulatedPlatformVersion), density); in StatusBar() 83 loadIcon(2, "stat_sys_battery_100.png", density); in StatusBar() 89 protected void loadIcon(int index, String iconName, Density density) { in loadIcon() argument 91 super.loadIcon(index, iconName, density); in loadIcon()
|
/frameworks/base/tools/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 | 203 public float density; field in DisplayMetrics 277 density = o.density; in setTo() 294 density = DENSITY_DEVICE / (float) DENSITY_DEFAULT; in setToDefaults() 296 scaledDensity = density; in setToDefaults() 301 noncompatDensity = density; in setToDefaults() 338 && density == other.density in equalsPhysical() 357 return "DisplayMetrics{density=" + density + ", width=" + widthPixels + in toString()
|
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/ |
D | BitmapFactory_Delegate.java | 55 Density density = Density.MEDIUM; in nativeDecodeStream() local 58 density = Density.getEnum(opts.inDensity); in nativeDecodeStream() 76 density); in nativeDecodeStream() 92 bm = Bitmap_Delegate.createBitmap(is, bitmapCreateFlags, density); in nativeDecodeStream() 135 final int density = opts.inDensity; in setDensityFromOptions() local 136 if (density != 0) { in setDensityFromOptions() 137 outputBitmap.setDensity(density); in setDensityFromOptions() 139 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in setDensityFromOptions()
|
D | Bitmap_Delegate.java | 108 public static Bitmap createBitmap(File input, boolean isMutable, Density density) in createBitmap() argument 110 return createBitmap(input, getPremultipliedBitmapCreateFlags(isMutable), density); in createBitmap() 124 Density density) throws IOException { in createBitmap() argument 143 return createBitmap(delegate, createFlags, density.getDpiValue()); in createBitmap() 156 public static Bitmap createBitmap(InputStream input, boolean isMutable, Density density) in createBitmap() argument 158 return createBitmap(input, getPremultipliedBitmapCreateFlags(isMutable), density); in createBitmap() 172 Density density) throws IOException { in createBitmap() argument 176 return createBitmap(delegate, createFlags, density.getDpiValue()); in createBitmap() 189 public static Bitmap createBitmap(BufferedImage image, boolean isMutable, Density density) { in createBitmap() argument 190 return createBitmap(image, getPremultipliedBitmapCreateFlags(isMutable), density); in createBitmap() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/display/ |
D | DisplayDensityUtils.java | 124 final int density = ((int) (defaultDensity * (1 - (i + 1) * interval))) & ~1; in DisplayDensityUtils() local 125 if (currentDensity == density) { in DisplayDensityUtils() 129 values[curIndex] = density; in DisplayDensityUtils() 145 final int density = ((int) (defaultDensity * (1 + (i + 1) * interval))) & ~1; in DisplayDensityUtils() local 146 if (currentDensity == density) { in DisplayDensityUtils() 149 values[curIndex] = density; in DisplayDensityUtils() 238 public static void setForcedDisplayDensity(final int displayId, final int density) { in setForcedDisplayDensity() argument 243 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/cmds/wm/src/com/android/commands/wm/ |
D | Wm.java | 200 int density; in runDisplayDensity() local 213 density = -1; in runDisplayDensity() 216 density = Integer.parseInt(densityStr); in runDisplayDensity() 221 if (density < 72) { in runDisplayDensity() 228 if (density > 0) { in runDisplayDensity() 230 mWm.setForcedDisplayDensityForUser(Display.DEFAULT_DISPLAY, density, in runDisplayDensity() 285 int density; in parseDimension() local 287 density = mWm.getBaseDisplayDensity(Display.DEFAULT_DISPLAY); in parseDimension() 289 density = DisplayMetrics.DENSITY_DEFAULT; in parseDimension() 291 return Integer.parseInt(s.substring(0, s.length() - 2)) * density / in parseDimension()
|
/frameworks/base/core/java/android/content/pm/ |
D | LauncherActivityInfo.java | 102 public Drawable getIcon(int density) { in getIcon() argument 107 if (density != 0 && iconRes != 0) { in getIcon() 111 icon = resources.getDrawableForDensity(iconRes, density); in getIcon() 171 public Drawable getBadgedIcon(int density) { in getBadgedIcon() argument 172 Drawable originalIcon = getIcon(density); in getBadgedIcon()
|
/frameworks/base/core/java/android/view/ |
D | ViewConfiguration.java | 347 final float density = metrics.density; in ViewConfiguration() local 350 sizeAndDensity = density * 1.5f; in ViewConfiguration() 352 sizeAndDensity = density; in ViewConfiguration() 357 mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); in ViewConfiguration() 432 final int density = (int) (100.0f * metrics.density); in get() local 434 ViewConfiguration configuration = sConfigurations.get(density); in get() 437 sConfigurations.put(density, configuration); in get()
|
/frameworks/support/core-ui/java/android/support/v4/view/ |
D | PagerTabStrip.java | 91 final float density = context.getResources().getDisplayMetrics().density; in PagerTabStrip() local 92 mIndicatorHeight = (int) (INDICATOR_HEIGHT * density + 0.5f); in PagerTabStrip() 93 mMinPaddingBottom = (int) (MIN_PADDING_BOTTOM * density + 0.5f); in PagerTabStrip() 94 mMinTextSpacing = (int) (MIN_TEXT_SPACING * density); in PagerTabStrip() 95 mTabPadding = (int) (TAB_PADDING * density + 0.5f); in PagerTabStrip() 96 mFullUnderlineHeight = (int) (FULL_UNDERLINE_HEIGHT * density + 0.5f); in PagerTabStrip() 97 mMinStripHeight = (int) (MIN_STRIP_HEIGHT * density + 0.5f); in PagerTabStrip()
|
/frameworks/base/core/java/android/appwidget/ |
D | AppWidgetProviderInfo.java | 276 public final Drawable loadIcon(@NonNull Context context, int density) { in loadIcon() argument 277 return loadDrawable(context, density, providerInfo.getIconResource(), true); in loadIcon() 296 public final Drawable loadPreviewImage(@NonNull Context context, int density) { in loadPreviewImage() argument 297 return loadDrawable(context, density, previewImage, false); in loadPreviewImage() 367 private Drawable loadDrawable(Context context, int density, int resourceId, in loadDrawable() argument 373 if (density < 0) { in loadDrawable() 374 density = 0; in loadDrawable() 376 return resources.getDrawableForDensity(resourceId, density, null); in loadDrawable()
|
/frameworks/base/core/java/android/preference/ |
D | PreferenceFrameLayout.java | 57 float density = context.getResources().getDisplayMetrics().density; in PreferenceFrameLayout() local 58 int defaultBorderTop = (int) (density * DEFAULT_BORDER_TOP + 0.5f); in PreferenceFrameLayout() 59 int defaultBottomPadding = (int) (density * DEFAULT_BORDER_BOTTOM + 0.5f); in PreferenceFrameLayout() 60 int defaultLeftPadding = (int) (density * DEFAULT_BORDER_LEFT + 0.5f); in PreferenceFrameLayout() 61 int defaultRightPadding = (int) (density * DEFAULT_BORDER_RIGHT + 0.5f); in PreferenceFrameLayout()
|
/frameworks/support/core-ui/java/android/support/v4/widget/ |
D | CircleImageView.java | 53 final float density = getContext().getResources().getDisplayMetrics().density; in CircleImageView() local 54 final int shadowYOffset = (int) (density * Y_OFFSET); in CircleImageView() 55 final int shadowXOffset = (int) (density * X_OFFSET); in CircleImageView() 57 mShadowRadius = (int) (density * SHADOW_RADIUS); in CircleImageView() 62 ViewCompat.setElevation(this, SHADOW_ELEVATION * density); in CircleImageView()
|
/frameworks/base/graphics/java/android/graphics/ |
D | BitmapFactory.java | 521 final int density = value.density; in decodeResourceStream() local 522 if (density == TypedValue.DENSITY_DEFAULT) { in decodeResourceStream() 524 } else if (density != TypedValue.DENSITY_NONE) { in decodeResourceStream() 525 opts.inDensity = density; in decodeResourceStream() 655 final int density = opts.inDensity; in setDensityFromOptions() local 656 if (density != 0) { in setDensityFromOptions() 657 outputBitmap.setDensity(density); in setDensityFromOptions() 659 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in setDensityFromOptions()
|
/frameworks/base/core/java/android/text/ |
D | TextPaint.java | 35 public float density = 1.0f; field in TextPaint 71 density = tp.density; in set()
|
/frameworks/base/tools/aapt2/split/ |
D | TableSplitter.cpp | 40 without_density.density = 0; in CopyWithoutDensity() 51 if (config.density == 0) { in SplitValueSelector() 55 config.density; in SplitValueSelector() 69 if (config_value->config.density == 0 && !entry.second) { in SelectValues() 93 target_density.density = density_value_iter->second; in SelectValues() 140 target_density.density = preferred_density; in MarkNonPreferredDensitiesAsClaimed() 221 if (config_value->config.density != 0) { in SplitTable()
|
/frameworks/support/samples/SupportLeanbackShowcase/app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/utils/ |
D | Utils.java | 30 float density = ctx.getResources().getDisplayMetrics().density; in convertDpToPixel() local 31 return Math.round((float) dp * density); in convertDpToPixel()
|
/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/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
D | RenderAction.java | 111 metrics.density = metrics.noncompatDensity = in init() 114 metrics.scaledDensity = metrics.noncompatScaledDensity = metrics.density; in init() 346 Density density = hardwareConfig.getDensity(); in getConfiguration() local 347 if (density == null) { in getConfiguration() 348 density = Density.MEDIUM; in getConfiguration() 351 config.screenWidthDp = hardwareConfig.getScreenWidth() / density.getDpiValue(); in getConfiguration() 352 config.screenHeightDp = hardwareConfig.getScreenHeight() / density.getDpiValue(); in getConfiguration() 359 config.densityDpi = density.getDpiValue(); in getConfiguration()
|
/frameworks/base/libs/hwui/ |
D | FrameInfoVisualizer.cpp | 61 static int dpToPx(int dp, float density) { in dpToPx() argument 62 return (int) (dp * density + 0.5f); in dpToPx() 74 void FrameInfoVisualizer::setDensity(float density) { in setDensity() argument 75 if (CC_UNLIKELY(mDensity != density)) { in setDensity() 76 mDensity = density; in setDensity() 77 mVerticalUnit = dpToPx(PROFILE_DRAW_DP_PER_MS, density); in setDensity() 78 mThresholdStroke = dpToPx(PROFILE_DRAW_THRESHOLD_STROKE_WIDTH, density); in setDensity()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | ConfigurationControllerImpl.java | 42 final int density = newConfig.densityDpi; in onConfigurationChanged() local 43 if (density != mDensity || mFontScale != fontScale) { in onConfigurationChanged() 45 mDensity = density; in onConfigurationChanged()
|
/frameworks/support/core-ui/tests/java/android/support/v4/widget/ |
D | SwipeRefreshLayoutTest.java | 112 float density = mSwipeRefresh.getResources().getDisplayMetrics().density; in testSetSize() local 113 assertEquals((int) (SwipeRefreshLayout.CIRCLE_DIAMETER * density), in testSetSize() 116 assertEquals((int) (SwipeRefreshLayout.CIRCLE_DIAMETER_LARGE * density), in testSetSize() 119 assertEquals((int) (SwipeRefreshLayout.CIRCLE_DIAMETER * density), in testSetSize() 123 assertEquals((int) (SwipeRefreshLayout.CIRCLE_DIAMETER * density), in testSetSize()
|