Use category icon for pending conversation widgets

Fix: 192333050
Test: Manual
Change-Id: Ie3895cd4747f1bec1c8ca9af82347bb0eafa7415
This commit is contained in:
Steven Ng
2021-06-29 15:10:17 +01:00
parent bf60673bbb
commit 12f7a59e5c
4 changed files with 50 additions and 8 deletions

View File

@@ -225,6 +225,14 @@ public class WidgetsModel {
return null;
}
/** Returns {@link PackageItemInfo} of a pending widget. */
public static PackageItemInfo newPendingItemInfo(ComponentName provider) {
if (CONVERSATION_WIDGET.equals(provider)) {
return new PackageItemInfo(provider.getPackageName(), PackageItemInfo.CONVERSATIONS);
}
return new PackageItemInfo(provider.getPackageName());
}
private WidgetPackageOrCategoryKey getWidgetPackageOrCategoryKey(WidgetItem item) {
if (CONVERSATION_WIDGET.equals(item.componentName)) {
return new WidgetPackageOrCategoryKey(PackageItemInfo.CONVERSATIONS, item.user);