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)
.isActivityEnabledForProfile(cn, mUser);
}
if (si.hasStatusFlag(ShortcutInfo.FLAG_AUTOINSTALL_ICON)) {
// Auto install icon
if (!isTargetValid) {
if (updateShortcutIntent(context, si, packageName)) {
infoUpdated = true;
} else if (si.hasPromiseIconUi()) {
removedShortcuts.put(si.id, true);
continue;
}
if (si.hasStatusFlag(ShortcutInfo.FLAG_AUTOINSTALL_ICON)
&& !isTargetValid) {
if (updateShortcutIntent(context, si, packageName)) {
infoUpdated = true;
} else if (si.hasPromiseIconUi()) {
removedShortcuts.put(si.id, true);
continue;
}
} else if (!isTargetValid) {
removedShortcuts.put(si.id, true);