File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
packages/SystemUI/src/com/android/systemui/recent Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -68,22 +68,13 @@ public RecentTasksLoader(Context context) {
6868
6969 // get the icon size we want -- on tablets, we use bigger icons
7070 boolean isTablet = res .getBoolean (R .bool .config_recents_interface_for_tablets );
71- int density = res .getDisplayMetrics ().densityDpi ;
7271 if (isTablet ) {
73- if (density == DisplayMetrics .DENSITY_LOW ) {
74- mIconDpi = DisplayMetrics .DENSITY_MEDIUM ;
75- } else if (density == DisplayMetrics .DENSITY_MEDIUM ) {
76- mIconDpi = DisplayMetrics .DENSITY_HIGH ;
77- } else if (density == DisplayMetrics .DENSITY_HIGH ) {
78- mIconDpi = DisplayMetrics .DENSITY_XHIGH ;
79- } else if (density == DisplayMetrics .DENSITY_XHIGH ) {
80- // We'll need to use a denser icon, or some sort of a mipmap
81- mIconDpi = DisplayMetrics .DENSITY_XHIGH ;
82- }
72+ ActivityManager activityManager =
73+ (ActivityManager ) context .getSystemService (Context .ACTIVITY_SERVICE );
74+ mIconDpi = activityManager .getLauncherLargeIconDensity ();
8375 } else {
8476 mIconDpi = res .getDisplayMetrics ().densityDpi ;
8577 }
86- mIconDpi = isTablet ? DisplayMetrics .DENSITY_HIGH : res .getDisplayMetrics ().densityDpi ;
8778
8879 // Render the default thumbnail background
8980 int width = (int ) res .getDimensionPixelSize (com .android .internal .R .dimen .thumbnail_width );
You can’t perform that action at this time.
0 commit comments