summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-11-14 18:14:18 (GMT)
committerDanesh M <daneshm90@gmail.com>2015-09-28 04:01:05 (GMT)
commite05f05dd78ca156f9937814e5f6ca5ec85f5dcdd (patch)
tree403a25ebe729ef173f3276f84a517c6b7929cbbf
parent29ad445ee2dbdf924ec7ac980c26f01f94290bb4 (diff)
downloadandroid_packages_apps_Trebuchet-e05f05dd78ca156f9937814e5f6ca5ec85f5dcdd.zip
android_packages_apps_Trebuchet-e05f05dd78ca156f9937814e5f6ca5ec85f5dcdd.tar.gz
android_packages_apps_Trebuchet-e05f05dd78ca156f9937814e5f6ca5ec85f5dcdd.tar.bz2
Fixing NullPointer Exception when user is deleted.
Bug: 18388507 Change-Id: I4176ea37a019c2a862e6b2875cc6b03ec9118571
-rw-r--r--src/com/android/launcher3/InstallShortcutReceiver.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index 9103fad..395c341 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -388,6 +388,9 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
// The is an internal launcher target shortcut.
UserHandleCompat user = UserManagerCompat.getInstance(context)
.getUserForSerialNumber(object.getLong(USER_HANDLE_KEY));
+ if (user == null) {
+ return null;
+ }
LauncherActivityInfoCompat info = LauncherAppsCompat.getInstance(context)
.resolveActivity(launcherIntent, user);