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

Commit 3290ec4c authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Preventing launcher crash because of invalid install shortcut intent

Change-Id: Ibede31c8f018b17da5f272aa505a31f40a1b76f3
parent 0be752ca
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -146,10 +146,13 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
            return;
        }

        if (DBG) Log.d(TAG, "Got INSTALL_SHORTCUT: " + data.toUri(0));
        PendingInstallShortcutInfo info = new PendingInstallShortcutInfo(data, context);
        info = convertToLauncherActivityIfPossible(info);
        if (info.launchIntent == null || info.label == null) {
            if (DBG) Log.e(TAG, "Invalid install shortcut intent");
            return;
        }

        info = convertToLauncherActivityIfPossible(info);
        queuePendingShortcutInfo(info, context);
    }