return null;
}
<<<<<<< HEAD
public void addAndBindAddedApps(final Context context, final ArrayList workspaceApps,
final ArrayList allAppsApps) {
Callbacks cb = mCallbacks != null ? mCallbacks.get() : null;
addAndBindAddedApps(context, workspaceApps, cb, allAppsApps);
}
public void addAndBindAddedApps(final Context context, final ArrayList workspaceApps,
final Callbacks callbacks, final ArrayList allAppsApps) {
if (workspaceApps == null || allAppsApps == null) {
=======
public void addAppsToAllApps(final Context ctx, final ArrayList allAppsApps) {
final Callbacks callbacks = mCallbacks != null ? mCallbacks.get() : null;
if (allAppsApps == null) {
throw new RuntimeException("allAppsApps must not be null");
}
if (allAppsApps.isEmpty()) {
return;
}
final ArrayList restoredAppsFinal = new ArrayList();
Iterator iter = allAppsApps.iterator();
while (iter.hasNext()) {
ItemInfo a = iter.next();
if (LauncherModel.appWasRestored(ctx, a.getIntent())) {
restoredAppsFinal.add((AppInfo) a);
}
}
// Process the newly added applications and add them to the database first
Runnable r = new Runnable() {
public void run() {
runOnMainThread(new Runnable() {
public void run() {
Callbacks cb = mCallbacks != null ? mCallbacks.get() : null;
if (callbacks == cb && cb != null) {
callbacks.bindAppsAdded(null, null, null, allAppsApps);
if (!restoredAppsFinal.isEmpty()) {
callbacks.bindAppsUpdated(restoredAppsFinal);
}
}
}
});
}
};
runOnWorkerThread(r);
}
public void addAndBindAddedWorkspaceApps(final Context context,
final ArrayList workspaceApps) {
final Callbacks callbacks = mCallbacks != null ? mCallbacks.get() : null;
if (workspaceApps == null) {
>>>>>>> 6508fe1b07ec888012255e3a2438382b45a9707f
throw new RuntimeException("workspaceApps and allAppsApps must not be null");
}
if (workspaceApps.isEmpty() && allAppsApps.isEmpty()) { |