Merge "Require valid arrays when adding and binding new Apps. (Bug 11627095)" into jb-ub-now-jolly-elf
This commit is contained in:
@@ -294,7 +294,7 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
|
||||
// Add the new apps to the model and bind them
|
||||
if (!addShortcuts.isEmpty()) {
|
||||
LauncherAppState app = LauncherAppState.getInstance();
|
||||
app.getModel().addAndBindAddedApps(context, addShortcuts, null);
|
||||
app.getModel().addAndBindAddedApps(context, addShortcuts, new ArrayList<AppInfo>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +282,10 @@ public class LauncherModel extends BroadcastReceiver {
|
||||
addAndBindAddedApps(context, workspaceApps, cb, allAppsApps);
|
||||
}
|
||||
public void addAndBindAddedApps(final Context context, final ArrayList<ItemInfo> workspaceApps,
|
||||
final Callbacks callbacks, final ArrayList<AppInfo> allAppsApps) {
|
||||
final Callbacks callbacks, final ArrayList<AppInfo> allAppsApps) {
|
||||
if (workspaceApps == null || allAppsApps == null) {
|
||||
throw new RuntimeException("workspaceApps and allAppsApps must not be null");
|
||||
}
|
||||
if (workspaceApps.isEmpty() && allAppsApps.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
@@ -1508,7 +1511,7 @@ public class LauncherModel extends BroadcastReceiver {
|
||||
}
|
||||
if (!added.isEmpty()) {
|
||||
Callbacks cb = mCallbacks != null ? mCallbacks.get() : null;
|
||||
addAndBindAddedApps(context, added, cb, null);
|
||||
addAndBindAddedApps(context, added, cb, new ArrayList<AppInfo>());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user