Fix NPE when trying to construct WorkspaceItemInfo with null intent data.
We change the way we parse the install queue; so this seems to be a rare case when trying to flush an install queue from an old apk with a launcher apk with the new parsing changes. Bug: 140935140 Change-Id: I14db4c3f70ed2e1bc5ad31dec7e6473cd6f8f13c
This commit is contained in:
committed by
Jonathan Miranda
parent
d2d58656a4
commit
79d6b30dce
@@ -631,6 +631,11 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
|
||||
}
|
||||
|
||||
private static WorkspaceItemInfo createWorkspaceItemInfo(Intent data, LauncherAppState app) {
|
||||
if (data == null) {
|
||||
Log.e(TAG, "Can't construct WorkspaceItemInfo with null data");
|
||||
return null;
|
||||
}
|
||||
|
||||
Intent intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
|
||||
String name = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
|
||||
Parcelable bitmap = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON);
|
||||
|
||||
Reference in New Issue
Block a user