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

Commit 2c155d5f authored by Wen Zhang's avatar Wen Zhang
Browse files

Pre-grant the location permission to the system Maps app on AAOS for Android T and after

BUG=206403774

Change-Id: I713293dba649d412b41432eb0571e11973c063d4
parent 01fa40ba
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -702,6 +702,14 @@ final class DefaultPermissionGrantPolicy {
                        DevicePolicyManager.ACTION_PROVISION_MANAGED_DEVICE, userId),
                userId, CONTACTS_PERMISSIONS);

        // Maps
        if (mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE, 0)) {
            grantPermissionsToSystemPackage(pm,
                getDefaultSystemHandlerActivityPackageForCategory(pm,
                        Intent.CATEGORY_APP_MAPS, userId),
                userId, FOREGROUND_LOCATION_PERMISSIONS);
        }

        // Email
        grantPermissionsToSystemPackage(pm,
                getDefaultSystemHandlerActivityPackageForCategory(pm,