Merge "Grant NFC tag app default permissions." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
23c8292acc
@@ -595,6 +595,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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user