Attach work badge to Weather and Battery widgets
Moving the part where widget icon is generated from WidgetsListHeader (UI thread) to IconCache (backend) Test: Open widget picker -> switch to work widget picker -> verify that Battery and Weather are badged Fix: 226132413, 209995894 Change-Id: I3d649f2b26d7d8e7b756129b5bae4433ea344d43
This commit is contained in:
@@ -18,7 +18,6 @@ package com.android.launcher3.widget;
|
||||
|
||||
import static com.android.launcher3.graphics.PreloadIconDrawable.newPendingIcon;
|
||||
import static com.android.launcher3.icons.FastBitmapDrawable.getDisabledColorFilter;
|
||||
import static com.android.launcher3.widget.WidgetSections.getWidgetSections;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
@@ -341,8 +340,6 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView
|
||||
if (mInfo.pendingItemInfo.widgetCategory == WidgetSections.NO_CATEGORY) {
|
||||
return null;
|
||||
}
|
||||
Context context = getContext();
|
||||
return context.getDrawable(getWidgetSections(context).get(
|
||||
mInfo.pendingItemInfo.widgetCategory).mSectionDrawable);
|
||||
return mInfo.pendingItemInfo.newIcon(getContext());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user