Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10b898ee authored by Jon Miranda's avatar Jon Miranda
Browse files

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
parent 76aadac4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);