DO NOT MERGE

Revert "Add xxhdpi; fix ActivityManager.getLauncherLargeIconSize() etc."

This reverts commit c1496d2d9a.

Change-Id: If60df742b19c925cc99b20d01108b84415b124ad
This commit is contained in:
Ramanan Rajeswaran
2012-02-13 13:53:39 -08:00
committed by Android Git Automerger
parent e6a0ec6060
commit 5e7bb1e675
6 changed files with 11 additions and 38 deletions

View File

@@ -1442,10 +1442,9 @@ public class ActivityManager {
public int getLauncherLargeIconDensity() {
final Resources res = mContext.getResources();
final int density = res.getDisplayMetrics().densityDpi;
final int sw = res.getConfiguration().smallestScreenWidthDp;
if (sw < 600) {
// Smaller than approx 7" tablets, use the regular icon size.
if ((res.getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK)
!= Configuration.SCREENLAYOUT_SIZE_XLARGE) {
return density;
}
@@ -1457,13 +1456,9 @@ public class ActivityManager {
case DisplayMetrics.DENSITY_HIGH:
return DisplayMetrics.DENSITY_XHIGH;
case DisplayMetrics.DENSITY_XHIGH:
return DisplayMetrics.DENSITY_XXHIGH;
case DisplayMetrics.DENSITY_XXHIGH:
return DisplayMetrics.DENSITY_XHIGH * 2;
return DisplayMetrics.DENSITY_MEDIUM * 2;
default:
// The density is some abnormal value. Return some other
// abnormal value that is a reasonable scaling of it.
return (int)(density*1.5f);
return density;
}
}
@@ -1476,10 +1471,9 @@ public class ActivityManager {
public int getLauncherLargeIconSize() {
final Resources res = mContext.getResources();
final int size = res.getDimensionPixelSize(android.R.dimen.app_icon_size);
final int sw = res.getConfiguration().smallestScreenWidthDp;
if (sw < 600) {
// Smaller than approx 7" tablets, use the regular icon size.
if ((res.getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK)
!= Configuration.SCREENLAYOUT_SIZE_XLARGE) {
return size;
}
@@ -1493,13 +1487,9 @@ public class ActivityManager {
case DisplayMetrics.DENSITY_HIGH:
return (size * DisplayMetrics.DENSITY_XHIGH) / DisplayMetrics.DENSITY_HIGH;
case DisplayMetrics.DENSITY_XHIGH:
return (size * DisplayMetrics.DENSITY_XXHIGH) / DisplayMetrics.DENSITY_XHIGH;
case DisplayMetrics.DENSITY_XXHIGH:
return (size * DisplayMetrics.DENSITY_XHIGH*2) / DisplayMetrics.DENSITY_XXHIGH;
return (size * DisplayMetrics.DENSITY_MEDIUM * 2) / DisplayMetrics.DENSITY_XHIGH;
default:
// The density is some abnormal value. Return some other
// abnormal value that is a reasonable scaling of it.
return (int)(size*1.5f);
return size;
}
}

View File

@@ -56,13 +56,6 @@ public class DisplayMetrics {
*/
public static final int DENSITY_XHIGH = 320;
/**
* Standard quantized DPI for extra-extra-high-density screens. Applications
* should not generally worry about this density; relying on XHIGH graphics
* being scaled up to it should be sufficient for almost all cases.
*/
public static final int DENSITY_XXHIGH = 480;
/**
* The reference density used throughout the system.
*/