mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Improving restored widget behavior
> Clicking a broken widget install shows a dialog similar to an app icon > Clicking remove on the dialog removed all components for the corresponding package > Widget pending view shows 'Setup' text instead of icon, if there is enough space Change-Id: I82ec0a1ee9542c1e3b860e6e00798a80450dce3c
This commit is contained in:
@@ -4847,16 +4847,11 @@ public class Workspace extends SmoothPagedView
|
||||
restorePendingWidgets(pkgNames);
|
||||
}
|
||||
|
||||
public void removeAbandonedPromise(BubbleTextView abandonedIcon, UserHandleCompat user) {
|
||||
if (abandonedIcon.getTag() != null && abandonedIcon.getTag() instanceof ShortcutInfo) {
|
||||
final ShortcutInfo shortcut = (ShortcutInfo) abandonedIcon.getTag();
|
||||
if (shortcut.isAbandoned()) {
|
||||
HashSet<ComponentName> cns = new HashSet<ComponentName>(1);
|
||||
cns.add(shortcut.getRestoredIntent().getComponent());
|
||||
LauncherModel.deleteItemFromDatabase(mLauncher, shortcut);
|
||||
removeItemsByComponentName(cns, user);
|
||||
}
|
||||
}
|
||||
public void removeAbandonedPromise(String packageName, UserHandleCompat user) {
|
||||
ArrayList<String> packages = new ArrayList<String>(1);
|
||||
packages.add(packageName);
|
||||
LauncherModel.deletePackageFromDatabase(mLauncher, packageName, user);
|
||||
removeItemsByPackageName(packages, user);
|
||||
}
|
||||
|
||||
public void updatePackageState(ArrayList<PackageInstallInfo> installInfos) {
|
||||
|
||||
Reference in New Issue
Block a user