summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/com/android/internal/widget/ActionBarView.java21
1 files changed, 1 insertions, 20 deletions
diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java
index a3d0fe4..83f3294 100644
--- a/core/java/com/android/internal/widget/ActionBarView.java
+++ b/core/java/com/android/internal/widget/ActionBarView.java
@@ -579,7 +579,7 @@ public class ActionBarView extends AbsActionBarView {
}
public void setIcon(int resId) {
- setIcon(mContext.getResources().getDrawableForDensity(resId, getPreferredIconDensity()));
+ setIcon(mContext.getResources().getDrawable(resId));
}
public void setLogo(Drawable logo) {
@@ -593,25 +593,6 @@ public class ActionBarView extends AbsActionBarView {
setLogo(mContext.getResources().getDrawable(resId));
}
- /**
- * @return Drawable density to load that will best fit the available height.
- */
- private int getPreferredIconDensity() {
- final Resources res = mContext.getResources();
- final int availableHeight = getLayoutParams().height -
- mHomeLayout.getVerticalIconPadding();
- int iconSize = res.getDimensionPixelSize(android.R.dimen.app_icon_size);
-
- if (iconSize * DisplayMetrics.DENSITY_LOW >= availableHeight) {
- return DisplayMetrics.DENSITY_LOW;
- } else if (iconSize * DisplayMetrics.DENSITY_MEDIUM >= availableHeight) {
- return DisplayMetrics.DENSITY_MEDIUM;
- } else if (iconSize * DisplayMetrics.DENSITY_HIGH >= availableHeight) {
- return DisplayMetrics.DENSITY_HIGH;
- }
- return DisplayMetrics.DENSITY_XHIGH;
- }
-
public void setNavigationMode(int mode) {
final int oldMode = mNavigationMode;
if (mode != oldMode) {