Merge "No need to differentiate package event into app or updated based on a package is being updated or not" into ub-launcher3-calgary
This commit is contained in:
@@ -103,7 +103,6 @@ public class LauncherModel extends BroadcastReceiver
|
||||
private static final int ITEMS_CHUNK = 6; // batch size for the workspace icons
|
||||
private static final long INVALID_SCREEN_ID = -1L;
|
||||
|
||||
@Thunk final boolean mAppsCanBeOnRemoveableStorage;
|
||||
private final boolean mOldContentProviderExists;
|
||||
|
||||
@Thunk final LauncherAppState mApp;
|
||||
@@ -217,7 +216,6 @@ public class LauncherModel extends BroadcastReceiver
|
||||
LauncherModel(LauncherAppState app, IconCache iconCache, AppFilter appFilter) {
|
||||
Context context = app.getContext();
|
||||
|
||||
mAppsCanBeOnRemoveableStorage = Environment.isExternalStorageRemovable();
|
||||
String oldProvider = context.getString(R.string.old_launcher_provider_uri);
|
||||
// This may be the same as MIGRATE_AUTHORITY, or it may be replaced by a different
|
||||
// resource string.
|
||||
@@ -1170,20 +1168,8 @@ public class LauncherModel extends BroadcastReceiver
|
||||
@Override
|
||||
public void onPackagesAvailable(String[] packageNames, UserHandleCompat user,
|
||||
boolean replacing) {
|
||||
if (!replacing) {
|
||||
enqueuePackageUpdated(new PackageUpdatedTask(PackageUpdatedTask.OP_ADD, packageNames,
|
||||
user));
|
||||
if (mAppsCanBeOnRemoveableStorage) {
|
||||
// Only rebind if we support removable storage. It catches the
|
||||
// case where
|
||||
// apps on the external sd card need to be reloaded
|
||||
startLoaderFromBackground();
|
||||
}
|
||||
} else {
|
||||
// If we are replacing then just update the packages in the list
|
||||
enqueuePackageUpdated(new PackageUpdatedTask(PackageUpdatedTask.OP_UPDATE,
|
||||
packageNames, user));
|
||||
}
|
||||
enqueuePackageUpdated(
|
||||
new PackageUpdatedTask(PackageUpdatedTask.OP_UPDATE, packageNames, user));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user