Reverting: Change I3a8849a5: Cleaning up extra line related to icon density change.
Change-Id: I5e8106d0f77545b80a0b21d4230cf826439ac371
This commit is contained in:
parent
08fc2344a4
commit
d83f5f4db3
|
@ -16,7 +16,9 @@
|
|||
|
||||
package com.android.launcher2;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
|
@ -24,7 +26,6 @@ import android.content.res.Resources;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.DisplayMetrics;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
@ -49,22 +50,13 @@ public class IconCache {
|
|||
private int mIconDpi;
|
||||
|
||||
public IconCache(LauncherApplication context) {
|
||||
ActivityManager activityManager =
|
||||
(ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
|
||||
mContext = context;
|
||||
mPackageManager = context.getPackageManager();
|
||||
if (LauncherApplication.isScreenLarge()) {
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
mIconDpi = context.getResources().getDisplayMetrics().densityDpi;
|
||||
}
|
||||
mIconDpi = activityManager.getLauncherLargeIconDensity();
|
||||
|
||||
// need to set mIconDpi before getting default icon
|
||||
mDefaultIcon = makeDefaultIcon();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue