diff options
author | Winson Chung <winsonc@google.com> | 2013-09-03 17:48:37 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2013-09-05 12:14:28 -0700 |
commit | c58497ee619416c4949b16eb43486c11618b69e5 (patch) | |
tree | b8bfd3ec331885a25f42c69fb41dbfd861a4763a /src/com/android/launcher3/LauncherModel.java | |
parent | 2d8de5845be5f49d3767b8354f0d5479a0715abe (diff) | |
download | android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.tar.gz android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.tar.bz2 android_packages_apps_Trebuchet-c58497ee619416c4949b16eb43486c11618b69e5.zip |
Initial changes to restore AllApps.
- Removes unused all apps code due to dynamic grid/spacing
- Attempts to use CellLayout instead of PagedViewCellLayout
Change-Id: I3c49bca9fc35dfeaf250591fd63bc7f36119968f
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index 0ebeec32d..9081e23b2 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -159,7 +159,8 @@ public class LauncherModel extends BroadcastReceiver { public void bindAllApplications(ArrayList<AppInfo> apps); public void bindAppsAdded(ArrayList<Long> newScreens, ArrayList<ItemInfo> addNotAnimated, - ArrayList<ItemInfo> addAnimated); + ArrayList<ItemInfo> addAnimated, + ArrayList<AppInfo> addedApps); public void bindAppsUpdated(ArrayList<AppInfo> apps); public void bindComponentsRemoved(ArrayList<String> packageNames, ArrayList<AppInfo> appInfos, @@ -276,12 +277,13 @@ public class LauncherModel extends BroadcastReceiver { return null; } - public void addAndBindAddedApps(final Context context, final ArrayList<ItemInfo> added) { + public void addAndBindAddedApps(final Context context, final ArrayList<ItemInfo> added, + final ArrayList<AppInfo> addedApps) { Callbacks cb = mCallbacks != null ? mCallbacks.get() : null; - addAndBindAddedApps(context, added, cb); + addAndBindAddedApps(context, added, cb, addedApps); } public void addAndBindAddedApps(final Context context, final ArrayList<ItemInfo> added, - final Callbacks callbacks) { + final Callbacks callbacks, final ArrayList<AppInfo> addedApps) { Launcher.addDumpLog(TAG, "10249126 - addAndBindAddedApps()", true); if (added.isEmpty()) { return; @@ -383,7 +385,7 @@ public class LauncherModel extends BroadcastReceiver { } } callbacks.bindAppsAdded(addedWorkspaceScreensFinal, - addNotAnimated, addAnimated); + addNotAnimated, addAnimated, addedApps); } } }); @@ -1477,13 +1479,15 @@ public class LauncherModel extends BroadcastReceiver { sBgDbIconCache.clear(); } - // Ensure that all the applications that are in the system are represented on the home - // screen. - Launcher.addDumpLog(TAG, "10249126 - verifyApplications - useMoreApps=" - + UPGRADE_USE_MORE_APPS_FOLDER + " isUpgrade=" + isUpgrade, true); - if (!UPGRADE_USE_MORE_APPS_FOLDER || !isUpgrade) { - Launcher.addDumpLog(TAG, "10249126 - verifyApplications(" + isUpgrade + ")", true); - verifyApplications(); + if (AppsCustomizePagedView.DISABLE_ALL_APPS) { + // Ensure that all the applications that are in the system are + // represented on the home screen. + Launcher.addDumpLog(TAG, "10249126 - verifyApplications - useMoreApps=" + + UPGRADE_USE_MORE_APPS_FOLDER + " isUpgrade=" + isUpgrade, true); + if (!UPGRADE_USE_MORE_APPS_FOLDER || !isUpgrade) { + Launcher.addDumpLog(TAG, "10249126 - verifyApplications(" + isUpgrade + ")", true); + verifyApplications(); + } } // Clear out this reference, otherwise we end up holding it until all of the @@ -1557,7 +1561,7 @@ public class LauncherModel extends BroadcastReceiver { } if (!added.isEmpty()) { Callbacks cb = mCallbacks != null ? mCallbacks.get() : null; - addAndBindAddedApps(context, added, cb); + addAndBindAddedApps(context, added, cb, null); } } @@ -2582,7 +2586,7 @@ public class LauncherModel extends BroadcastReceiver { // Ensure that we add all the workspace applications to the db final ArrayList<ItemInfo> addedInfos = new ArrayList<ItemInfo>(added); Callbacks cb = mCallbacks != null ? mCallbacks.get() : null; - addAndBindAddedApps(context, addedInfos, cb); + addAndBindAddedApps(context, addedInfos, cb, added); } if (modified != null) { final ArrayList<AppInfo> modifiedFinal = modified; |