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

Commit fbeaa762 authored by Renato Grottesi's avatar Renato Grottesi Committed by Automerger Merge Worker
Browse files

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

parents 4bbeb068 dedca445
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