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

Commit 8f236d27 authored by Nihar Thakkar's avatar Nihar Thakkar
Browse files

Automatically grant permissions for Account Manager.

parent cf192624
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -686,6 +686,16 @@ final class DefaultPermissionGrantPolicy {
                    && doesPackageSupportRuntimePermissions(storageManagerPckg)) {
                grantRuntimePermissionsLPw(storageManagerPckg, STORAGE_PERMISSIONS, true, userId);
            }
            
            // Account Manager
      	    PackageParser.Package accountManagerPackage = getDefaultProviderAuthorityPackageLPr(
            "at.bitfire.davdroid", userId);
      	    if (accountManagerPackage != null) {
          	    grantRuntimePermissionsLPw(accountManagerPackage, CONTACTS_PERMISSIONS, userId);
          	    grantRuntimePermissionsLPw(accountManagerPackage, CALENDAR_PERMISSIONS, userId);
          	    grantRuntimePermissionsLPw(accountManagerPackage, LOCATION_PERMISSIONS, userId);
      	    }
            
            mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId);
        }
    }