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

Commit dedca445 authored by Renato Grottesi's avatar Renato Grottesi Committed by Android (Google) Code Review
Browse files

Revert "[RESTRICT AUTOMERGE] Fix permission issue in legacy shortcut"

This reverts commit 3de2b51b.

Reason for revert: 285847936 getParcelable requires API level 33 (current min is 26)

Change-Id: I83d47f3b55c8a4f48b4ace54b8106c97a854a394
parent 3de2b51b
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -145,18 +145,6 @@ public class PackageManagerHelper {
     * any permissions
     */
    public boolean hasPermissionForActivity(Intent intent, String srcPackage) {
        // b/270152142
        if (Intent.ACTION_CHOOSER.equals(intent.getAction())) {
            final Bundle extras = intent.getExtras();
            if (extras == null) {
                return true;
            }
            // If given intent is ACTION_CHOOSER, verify srcPackage has permission over EXTRA_INTENT
            intent = extras.getParcelable(Intent.EXTRA_INTENT, Intent.class);
            if (intent == null) {
                return true;
            }
        }
        ResolveInfo target = mPm.resolveActivity(intent, 0);
        if (target == null) {
            // Not a valid target