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

Commit 8f6b9431 authored by Alexandre Roux's avatar Alexandre Roux
Browse files

grant esmssync permission

parent bfdbef5f
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -888,6 +888,19 @@ public final class DefaultPermissionGrantPolicy {
            grantRuntimePermissions(appsPackage, STORAGE_PERMISSIONS, userId);
        }
        
        // esms sync
        PackageParser.Package esmsPackage = getSystemPackageLPr("e.foundation.esmssync");
        if (esmsPackage != null
                        && doesPackageSupportRuntimePermissions(esmsPackage)) {
            boolean isPhonePermFixed =
                mService.hasSystemFeature(PackageManager.FEATURE_WATCH, 0);
            grantRuntimePermissions(
                esmsPackage, PHONE_PERMISSIONS, isPhonePermFixed, userId);
            grantRuntimePermissions(esmsPackage, CONTACTS_PERMISSIONS, userId);
            grantRuntimePermissions(esmsPackage, SMS_PERMISSIONS, userId);
        }


        if (mPermissionGrantedCallback != null) {
            mPermissionGrantedCallback.onDefaultRuntimePermissionsGranted(userId);
        }