summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-03-02 19:33:35 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-02 19:33:35 +0000
commit5b437d8957c21b5fab42d3540db39da09378cfd7 (patch)
treeeee3aa99415416f07fb108dffc5a04033d0ecb13 /src/com/android/launcher3/LauncherModel.java
parent53fca52d3b2db08a35ab7af6f9bc52f6cd8f28a4 (diff)
parentc9acdd51c40c1b397adae6ba62c4acd01914b473 (diff)
downloadandroid_packages_apps_Trebuchet-5b437d8957c21b5fab42d3540db39da09378cfd7.tar.gz
android_packages_apps_Trebuchet-5b437d8957c21b5fab42d3540db39da09378cfd7.tar.bz2
android_packages_apps_Trebuchet-5b437d8957c21b5fab42d3540db39da09378cfd7.zip
Merge "Removed disableAllApps flag" into ub-launcher3-burnaby
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r--src/com/android/launcher3/LauncherModel.java36
1 files changed, 1 insertions, 35 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 489e3299d..cb9d12e01 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -1625,12 +1625,6 @@ public class LauncherModel extends BroadcastReceiver
}
}
- 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;
@@ -1681,28 +1675,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<ItemInfo> tmpInfos;
- ArrayList<ItemInfo> added = new ArrayList<ItemInfo>();
- 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<Long, ItemInfo[][]> occupied, ItemInfo item) {
LauncherAppState app = LauncherAppState.getInstance();
@@ -3085,13 +3057,7 @@ public class LauncherModel extends BroadcastReceiver
new HashMap<ComponentName, AppInfo>();
if (added != null) {
- // Ensure that we add all the workspace applications to the db
- if (LauncherAppState.isDisableAllApps()) {
- final ArrayList<ItemInfo> addedInfos = new ArrayList<ItemInfo>(added);
- addAndBindAddedWorkspaceApps(context, addedInfos);
- } else {
- addAppsToAllApps(context, added);
- }
+ addAppsToAllApps(context, added);
for (AppInfo ai : added) {
addedOrUpdatedApps.put(ai.componentName, ai);
}