summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-01-24 15:51:53 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-24 15:51:53 -0800
commit2ca25cd6d63f818c45e53370690fbf625524909a (patch)
tree56053aaa5a1d8b480adf7ae83e2883800bd027c2 /packages
parentfa1a91628a706bbe51d91e0ccb9144df8b8529e6 (diff)
parent43e34f61f0014400583895525fa08274615a21d2 (diff)
downloadframeworks_base-2ca25cd6d63f818c45e53370690fbf625524909a.zip
frameworks_base-2ca25cd6d63f818c45e53370690fbf625524909a.tar.gz
frameworks_base-2ca25cd6d63f818c45e53370690fbf625524909a.tar.bz2
Merge "Call ActivityManager to get the proper icon dpi."
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentTasksLoader.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentTasksLoader.java b/packages/SystemUI/src/com/android/systemui/recent/RecentTasksLoader.java
index dcda9c2..4145fc4 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentTasksLoader.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentTasksLoader.java
@@ -68,22 +68,13 @@ public class RecentTasksLoader {
// get the icon size we want -- on tablets, we use bigger icons
boolean isTablet = res.getBoolean(R.bool.config_recents_interface_for_tablets);
- int density = res.getDisplayMetrics().densityDpi;
if (isTablet) {
- if (density == DisplayMetrics.DENSITY_LOW) {
- mIconDpi = DisplayMetrics.DENSITY_MEDIUM;
- } else if (density == DisplayMetrics.DENSITY_MEDIUM) {
- mIconDpi = DisplayMetrics.DENSITY_HIGH;
- } else if (density == DisplayMetrics.DENSITY_HIGH) {
- mIconDpi = DisplayMetrics.DENSITY_XHIGH;
- } else if (density == DisplayMetrics.DENSITY_XHIGH) {
- // We'll need to use a denser icon, or some sort of a mipmap
- mIconDpi = DisplayMetrics.DENSITY_XHIGH;
- }
+ ActivityManager activityManager =
+ (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+ mIconDpi = activityManager.getLauncherLargeIconDensity();
} else {
mIconDpi = res.getDisplayMetrics().densityDpi;
}
- mIconDpi = isTablet ? DisplayMetrics.DENSITY_HIGH : res.getDisplayMetrics().densityDpi;
// Render the default thumbnail background
int width = (int) res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_width);