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

Commit 6834e11d authored by Alex Johnston's avatar Alex Johnston
Browse files

Replace can managed scope enforce methods

Removed DPMS methods
* enforceCanManageScope
* enforceCanManageScopeOrCheckPermission
* ensureAllUsersAffiliated

Updated DPMS methods
* installKeyPair
* removeKeyPair
* setKeyGrantForApp
* generateKeyPair
* setKeyPairCertificate
* setKeepUninstalledPackages
* getKeepUninstalledPackages
* setApplicationRestrictions
* isNetworkLoggingEnabled
* getApplicationRestrictions
* setPackagesSuspended
* isPackageSuspended
* setApplicationHidden
* isApplicationHidden
* enableSystemApp
* enableSystemAppWithIntent
* installExistingPackage
* setNetworkLoggingEnabled
* retrieveNetworkLogs
* setUninstallBlocked
* setPermissionPolicy
* setPermissionGrantState
* getPermissionGrantState
* requestBugreport
* retrievePreRebootSecurityLogs
* retrieveSecurityLogs

Bug: 163732959
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstaller
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegationCertSelection
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegation
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testApplicationRestrictionIsRestricted
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegatedCertInstaller
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegatedCertInstallerDirectly
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegationCertSelection
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegation
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testApplicationRestrictionIsRestricted

Change-Id: Ifa0372021148d779d7b73034c3b51c9c903a4464
parent 56a78405
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ public class Preconditions {
     * @param message the message of the security exception to be thrown
     * @throws SecurityException if {@code expression} is false
     */
    public static void checkSecurity(final boolean expression, final String message) {
    public static void checkCallAuthorization(final boolean expression, final String message) {
        if (!expression) {
            throw new SecurityException(message);
        }