Merge "Fix auto install add of installed activity" into ub-launcher3-master

This commit is contained in:
Tony Wickham 2018-09-07 21:15:15 +00:00 committed by Android (Google) Code Review
commit eaa3ee39ce
1 changed files with 7 additions and 10 deletions

View File

@ -227,16 +227,13 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
isTargetValid = LauncherAppsCompat.getInstance(context) isTargetValid = LauncherAppsCompat.getInstance(context)
.isActivityEnabledForProfile(cn, mUser); .isActivityEnabledForProfile(cn, mUser);
} }
if (si.hasStatusFlag(ShortcutInfo.FLAG_AUTOINSTALL_ICON)
if (si.hasStatusFlag(ShortcutInfo.FLAG_AUTOINSTALL_ICON)) { && !isTargetValid) {
// Auto install icon if (updateShortcutIntent(context, si, packageName)) {
if (!isTargetValid) { infoUpdated = true;
if (updateShortcutIntent(context, si, packageName)) { } else if (si.hasPromiseIconUi()) {
infoUpdated = true; removedShortcuts.put(si.id, true);
} else if (si.hasPromiseIconUi()) { continue;
removedShortcuts.put(si.id, true);
continue;
}
} }
} else if (!isTargetValid) { } else if (!isTargetValid) {
removedShortcuts.put(si.id, true); removedShortcuts.put(si.id, true);