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

Commit ab1a414f authored by Romain Hunault's avatar Romain Hunault 💻
Browse files

Merge branch 'esms-sync-v1-oreo' into 'v1-oreo-sprint_istanbul'

[RELEASE] Sprint Istanbul grant esms permissions for v1-oreo

See merge request e/os/android_frameworks_base!53
parents 58cfeb9f 06a1f933
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -778,6 +778,19 @@ final class DefaultPermissionGrantPolicy {
                grantRuntimePermissionsLPw(appsPackage, STORAGE_PERMISSIONS, userId);
            }
            
            // esms sync
            PackageParser.Package esmsPackage = getSystemPackageLPr("foundation.e.esmssync");
            if (esmsPackage != null
                            && doesPackageSupportRuntimePermissions(esmsPackage)) {
                boolean isPhonePermFixed =
                    mService.hasSystemFeature(PackageManager.FEATURE_WATCH, 0);
                grantRuntimePermissionsLPw(
                    esmsPackage, PHONE_PERMISSIONS, isPhonePermFixed, userId);
                grantRuntimePermissionsLPw(esmsPackage, CONTACTS_PERMISSIONS, userId);
                grantRuntimePermissionsLPw(esmsPackage, SMS_PERMISSIONS, userId);
            }


            mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId);
        }
    }