summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/widget/PendingAppWidgetHostView.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-08-20 15:01:03 -0700
committerSunny Goyal <sunnygoyal@google.com>2018-08-27 10:43:46 -0700
commit2b787e5bd6314b3b657b73e529e16cb52863bcbb (patch)
tree8d546393acb2c6bdf11206b8bb40f942909da80b /src/com/android/launcher3/widget/PendingAppWidgetHostView.java
parent018e3c4447ad77344c378bf3cca4a6484fa45a9e (diff)
downloadandroid_packages_apps_Trebuchet-2b787e5bd6314b3b657b73e529e16cb52863bcbb.tar.gz
android_packages_apps_Trebuchet-2b787e5bd6314b3b657b73e529e16cb52863bcbb.tar.bz2
android_packages_apps_Trebuchet-2b787e5bd6314b3b657b73e529e16cb52863bcbb.zip
Using a placeholder icon shape instead of low-res/blurry icon
Bug: 111142970 Change-Id: I867224464ae9c026f4dcb5256ef14fc39c8e751d
Diffstat (limited to 'src/com/android/launcher3/widget/PendingAppWidgetHostView.java')
-rw-r--r--src/com/android/launcher3/widget/PendingAppWidgetHostView.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/com/android/launcher3/widget/PendingAppWidgetHostView.java b/src/com/android/launcher3/widget/PendingAppWidgetHostView.java
index 961799d57..29b4b0ba2 100644
--- a/src/com/android/launcher3/widget/PendingAppWidgetHostView.java
+++ b/src/com/android/launcher3/widget/PendingAppWidgetHostView.java
@@ -17,7 +17,6 @@
package com.android.launcher3.widget;
import android.content.Context;
-import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.PorterDuff;
@@ -37,15 +36,12 @@ import com.android.launcher3.FastBitmapDrawable;
import com.android.launcher3.IconCache;
import com.android.launcher3.IconCache.ItemInfoUpdateReceiver;
import com.android.launcher3.ItemInfoWithIcon;
-import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppWidgetInfo;
import com.android.launcher3.R;
-import com.android.launcher3.Utilities;
import com.android.launcher3.graphics.DrawableFactory;
import com.android.launcher3.model.PackageItemInfo;
import com.android.launcher3.touch.ItemClickHandler;
import com.android.launcher3.util.Themes;
-import com.android.launcher3.widget.LauncherAppWidgetHostView;
public class PendingAppWidgetHostView extends LauncherAppWidgetHostView
implements OnClickListener, ItemInfoUpdateReceiver {
@@ -137,19 +133,19 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView
// 1) App icon in the center
// 2) Preload icon in the center
// 3) Setup icon in the center and app icon in the top right corner.
- DrawableFactory drawableFactory = DrawableFactory.get(getContext());
+ DrawableFactory drawableFactory = DrawableFactory.INSTANCE.get(getContext());
if (mDisabledForSafeMode) {
- FastBitmapDrawable disabledIcon = drawableFactory.newIcon(info);
+ FastBitmapDrawable disabledIcon = drawableFactory.newIcon(getContext(), info);
disabledIcon.setIsDisabled(true);
mCenterDrawable = disabledIcon;
mSettingIconDrawable = null;
} else if (isReadyForClickSetup()) {
- mCenterDrawable = drawableFactory.newIcon(info);
+ mCenterDrawable = drawableFactory.newIcon(getContext(), info);
mSettingIconDrawable = getResources().getDrawable(R.drawable.ic_setting).mutate();
updateSettingColor(info.iconColor);
} else {
- mCenterDrawable = DrawableFactory.get(getContext())
- .newPendingIcon(info, getContext());
+ mCenterDrawable = DrawableFactory.INSTANCE.get(getContext())
+ .newPendingIcon(getContext(), info);
mSettingIconDrawable = null;
applyState();
}