mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 00:36:49 +00:00
Fixed a bug where restored promise icons stay promise icons.
Test:
1 Turn off WiFi
2 Install app. (Promise icon gets added to home screen).
3 Backup launcher.
4 Restore launcher.
5 Turn on WiFi
6 Note promise icon gets updated with as installation progresses.
Will submit to future/master later.
Bug: 140212732
Change-Id: I63cedc6c16f5028297fb1a0852ffbd4473319ae9
(cherry picked from commit 0e1b17f8c4)
This commit is contained in:
committed by
Jonathan Miranda
parent
6d5511a42f
commit
3944746fb6
@@ -55,6 +55,9 @@ import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import static com.android.launcher3.WorkspaceItemInfo.FLAG_AUTOINSTALL_ICON;
|
||||
import static com.android.launcher3.WorkspaceItemInfo.FLAG_RESTORED_ICON;
|
||||
|
||||
/**
|
||||
* Handles updates due to changes in package manager (app installed/updated/removed)
|
||||
* or when a user availability changes.
|
||||
@@ -221,7 +224,7 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
isTargetValid = LauncherAppsCompat.getInstance(context)
|
||||
.isActivityEnabledForProfile(cn, mUser);
|
||||
}
|
||||
if (si.hasStatusFlag(FLAG_AUTOINSTALL_ICON)) {
|
||||
if (si.hasStatusFlag(FLAG_RESTORED_ICON | FLAG_AUTOINSTALL_ICON)) {
|
||||
if (updateWorkspaceItemIntent(context, si, packageName)) {
|
||||
infoUpdated = true;
|
||||
} else if (si.hasPromiseIconUi()) {
|
||||
|
||||
Reference in New Issue
Block a user