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

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

Merge branch 'v1-oreo-sprint_lockdown' into 'v1-oreo'

[RELEASE] Sprint Lockdown

See merge request e/os/android_frameworks_base!65
parents 08e064c1 a54daf84
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -771,6 +771,16 @@ final class DefaultPermissionGrantPolicy {
                grantRuntimePermissionsLPw(accountManagerPackage, TASKS_PERMISSIONS, userId);
            }
            
             // eDrive
            PackageParser.Package drivePackage = getSystemPackageLPr("foundation.e.drive");
            if (drivePackage != null
                            && doesPackageSupportRuntimePermissions(drivePackage)) {
                grantRuntimePermissionsLPw(drivePackage, CONTACTS_PERMISSIONS, userId);
                grantRuntimePermissionsLPw(drivePackage, STORAGE_PERMISSIONS, userId);
              
            }


            // Apps
            PackageParser.Package appsPackage = getSystemPackageLPr("foundation.e.apps");
            if (appsPackage != null
@@ -778,6 +788,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);
        }
    }