summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-05-14 11:59:43 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-14 11:59:43 -0700
commit07381ae4e4a24466c6f2d81a3e6736c9fda5bb19 (patch)
treeaad48dd0327f2c095d5ed02dd24b9b63c2cbf4a4
parent42e2235780046beba1ea3162f615cef06cf97728 (diff)
parentcdbbab76e1e6e2819c16e0c2d3b528cf4ecd48c5 (diff)
downloadandroid_packages_apps_Trebuchet-07381ae4e4a24466c6f2d81a3e6736c9fda5bb19.tar.gz
android_packages_apps_Trebuchet-07381ae4e4a24466c6f2d81a3e6736c9fda5bb19.tar.bz2
android_packages_apps_Trebuchet-07381ae4e4a24466c6f2d81a3e6736c9fda5bb19.zip
am cdbbab76: Fixing NPE in Workspace.removeItemsByPackageName() (Bug 8942242)
* commit 'cdbbab76e1e6e2819c16e0c2d3b528cf4ecd48c5': Fixing NPE in Workspace.removeItemsByPackageName() (Bug 8942242)
-rw-r--r--src/com/android/launcher2/Workspace.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index ac4c3ddb4..c7252960d 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -3659,21 +3659,21 @@ public class Workspace extends SmoothPagedView
if (tag instanceof ShortcutInfo) {
ShortcutInfo info = (ShortcutInfo) tag;
ComponentName cn = info.intent.getComponent();
- if (packageNames.contains(cn.getPackageName())) {
+ if ((cn != null) && packageNames.contains(cn.getPackageName())) {
cns.add(cn);
}
} else if (tag instanceof FolderInfo) {
FolderInfo info = (FolderInfo) tag;
for (ShortcutInfo s : info.contents) {
ComponentName cn = s.intent.getComponent();
- if (packageNames.contains(cn.getPackageName())) {
+ if ((cn != null) && packageNames.contains(cn.getPackageName())) {
cns.add(cn);
}
}
} else if (tag instanceof LauncherAppWidgetInfo) {
LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) tag;
ComponentName cn = info.providerName;
- if (packageNames.contains(cn.getPackageName())) {
+ if ((cn != null) && packageNames.contains(cn.getPackageName())) {
cns.add(cn);
}
}