Fixing NullPointer Exception when user is deleted.
Bug: 18388507 Change-Id: I4176ea37a019c2a862e6b2875cc6b03ec9118571
This commit is contained in:
parent
e0f58d7364
commit
06910a8844
|
@ -388,6 +388,9 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
|
||||||
// The is an internal launcher target shortcut.
|
// The is an internal launcher target shortcut.
|
||||||
UserHandleCompat user = UserManagerCompat.getInstance(context)
|
UserHandleCompat user = UserManagerCompat.getInstance(context)
|
||||||
.getUserForSerialNumber(object.getLong(USER_HANDLE_KEY));
|
.getUserForSerialNumber(object.getLong(USER_HANDLE_KEY));
|
||||||
|
if (user == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
LauncherActivityInfoCompat info = LauncherAppsCompat.getInstance(context)
|
LauncherActivityInfoCompat info = LauncherAppsCompat.getInstance(context)
|
||||||
.resolveActivity(launcherIntent, user);
|
.resolveActivity(launcherIntent, user);
|
||||||
|
|
Loading…
Reference in New Issue