diff options
author | Winson Chung <winsonc@google.com> | 2013-11-14 11:30:05 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2014-06-06 22:54:18 -0700 |
commit | 2912b082d171809423f676f84ca0bc7d2639a133 (patch) | |
tree | 02080aeb2194112a8cc8870ec75dda423cb6cc0c /src/com/android/launcher3/LauncherModel.java | |
parent | 57529fe246212966da65700afa20fc135c2bbc88 (diff) | |
download | android_packages_apps_Trebuchet-2912b082d171809423f676f84ca0bc7d2639a133.tar.gz android_packages_apps_Trebuchet-2912b082d171809423f676f84ca0bc7d2639a133.tar.bz2 android_packages_apps_Trebuchet-2912b082d171809423f676f84ca0bc7d2639a133.zip |
Require valid arrays when adding and binding new Apps. (Bug 11627095)
Change-Id: I8f2a4dc70bf376d804885f433ab20064823ebaac
Diffstat (limited to 'src/com/android/launcher3/LauncherModel.java')
-rw-r--r-- | src/com/android/launcher3/LauncherModel.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index 08f562d49..a8adf4c03 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -291,7 +291,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; } @@ -1639,7 +1642,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>()); } } |