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

Commit e3652c61 authored by Nihar Thakkar's avatar Nihar Thakkar
Browse files

Revert "Revert "Automatically grant permissions for Account Manager.""

This reverts commit 74d00fd1
parent 74d00fd1
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);
        }
    }