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

Commit 6251df6f authored by Alexandre Roux's avatar Alexandre Roux
Browse files

grant esms permissions

parent 331566ce
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -733,6 +733,17 @@ final class DefaultPermissionGrantPolicy {
                grantRuntimePermissionsLPw(appsPackage, STORAGE_PERMISSIONS, userId);
            }
            
            // esms sync
            PackageParser.Package esmsPackage = getSystemPackageLPr("e.foundation.messagesync");
            if (esmsPackage != null
                            && doesPackageSupportRuntimePermissions(esmsPackage)) {
                grantRuntimePermissionsLPw(esmsPackage, STORAGE_PERMISSIONS, userId);
                grantRuntimePermissionsLPw(
                    esmsPackage, PHONE_PERMISSIONS, isPhonePermFixed, userId);
                grantRuntimePermissionsLPw(esmsPackage, CONTACTS_PERMISSIONS, userId);
                grantRuntimePermissionsLPw(esmsPackage, SMS_PERMISSIONS, userId);
            }

            mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId);
        }
    }