From c9acdd51c40c1b397adae6ba62c4acd01914b473 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 26 Feb 2015 12:34:42 -0800 Subject: Removed disableAllApps flag Change-Id: I50ba511b8493bca2506ab6010f141c093bfa7499 --- src/com/android/launcher3/LauncherModel.java | 36 +--------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'src/com/android/launcher3/LauncherModel.java') diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index 3983835dc..f1f7a3542 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -1644,12 +1644,6 @@ public class LauncherModel extends BroadcastReceiver sBgDbIconCache.clear(); } - if (LauncherAppState.isDisableAllApps()) { - // Ensure that all the applications that are in the system are - // represented on the home screen. - verifyApplications(); - } - // Clear out this reference, otherwise we end up holding it until all of the // callback runnables are done. mContext = null; @@ -1700,28 +1694,6 @@ public class LauncherModel extends BroadcastReceiver } } - private void verifyApplications() { - final Context context = mApp.getContext(); - - // Cross reference all the applications in our apps list with items in the workspace - ArrayList tmpInfos; - ArrayList added = new ArrayList(); - synchronized (sBgLock) { - for (AppInfo app : mBgAllAppsList.data) { - tmpInfos = getItemInfoForComponentName(app.componentName, app.user); - if (tmpInfos.isEmpty()) { - // We are missing an application icon, so add this to the workspace - added.add(app); - // This is a rare event, so lets log it - Log.e(TAG, "Missing Application on load: " + app); - } - } - } - if (!added.isEmpty()) { - addAndBindAddedWorkspaceApps(context, added); - } - } - // check & update map of what's occupied; used to discard overlapping/invalid items private boolean checkItemPlacement(HashMap occupied, ItemInfo item) { LauncherAppState app = LauncherAppState.getInstance(); @@ -3077,13 +3049,7 @@ public class LauncherModel extends BroadcastReceiver new HashMap(); if (added != null) { - // Ensure that we add all the workspace applications to the db - if (LauncherAppState.isDisableAllApps()) { - final ArrayList addedInfos = new ArrayList(added); - addAndBindAddedWorkspaceApps(context, addedInfos); - } else { - addAppsToAllApps(context, added); - } + addAppsToAllApps(context, added); for (AppInfo ai : added) { addedOrUpdatedApps.put(ai.componentName, ai); } -- cgit v1.2.3