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

Commit 284b165d authored by Martijn Coenen's avatar Martijn Coenen
Browse files

Grant NFC tag app default permissions.

Bug: 25535025
Change-Id: I7fbe261c9c48844b7a6833c85df2268afc5215e0
parent 36e480cf
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -597,6 +597,16 @@ final class DefaultPermissionGrantPolicy {
                grantRuntimePermissionsLPw(emergencyInfoPckg, PHONE_PERMISSIONS, true, userId);
            }

            // NFC Tag viewer
            Intent nfcTagIntent = new Intent(Intent.ACTION_VIEW);
            nfcTagIntent.setType("vnd.android.cursor.item/ndef_msg");
            PackageParser.Package nfcTagPkg = getDefaultSystemHandlerActivityPackageLPr(
                    nfcTagIntent, userId);
            if (nfcTagPkg != null
                    && doesPackageSupportRuntimePermissions(nfcTagPkg)) {
                grantRuntimePermissionsLPw(nfcTagPkg, CONTACTS_PERMISSIONS, false, userId);
                grantRuntimePermissionsLPw(nfcTagPkg, PHONE_PERMISSIONS, false, userId);
            }
            mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId);
        }
    }