Skip to content
Commit 65eacc95 authored by Alex Johnston's avatar Alex Johnston
Browse files

Replace enforce permission checks in DPMS

Replaced
* enforceFullCrossUsersPermission -> hasFullCrossUsersPermission
* enforceCrossUsersPermission -> hasCrossUsersPermission

Removed
* enforceSystemUserOrPermissionIfCrossUser
* enforceSystemUserOrPermission
* enforceAcrossUsersPermissions
* hasMarkProfileOwnerOnOrganizationOwnedDevicePermission

Updated methods
* getCurrentFailedPasswordAttempts
* getAllCrossProfilePackages
* setActiveAdmin
* isAdminActive
* isRemovingAdmin
* hasGrantedPolicy
* getActiveAdmins
* packageHasActiveAdmins
* removeActiveAdmin
* getPasswordQuality
* getPasswordExpirationTimeout
* getPasswordExpiration
* getStrictestPasswordRequirement
* getPasswordMinimumMetrics
* isActivePasswordSufficient
* isProfileActivePasswordSufficientForParent
* isPasswordSufficientAfterProfileUnification
* getCurrentFailedPasswordAttempts
* getMaximumFailedPasswordsForWipe
* getProfileWithMinimumFailedPasswordsForWipe
* getMaximumTimeToLock
* getRequiredStrongAuthTimeout
* wipeDataWithReason
* getRemoveWarning
* reportFailedPasswordAttempt
* reportSuccessfulPasswordAttempt
* reportFailedBiometricAttempt
* reportSuccessfulBiometricAttempt
* reportKeyguardDismissed
* reportKeyguardSecured
* getGlobalProxyAdmin
* getStorageEncryption
* getStorageEncryptionStatus
* getKeyguardDisabledFeatures
* getTrustAgentConfiguration
* getAccountTypesWithManagementDisabledAsUser
* setOrganizationColorForUser
* getOrganizationColorForUser
* getOrganizationNameForUser
* getProfileOwnerAsUser
* getCrossProfileCallerIdDisabledForUser
* getCrossProfileContactsSearchDisabledForUser
* isPackageAllowedToAccessCalendarForUser
* getCrossProfileCalendarPackagesForUser
* getActiveAdminOrCheckPermissionForCallerLocked
* resetPassword
* lockNow
* enforceNetworkStackOrProfileOrDeviceOwner
* getFactoryResetProtectionPolicy

Bug: 165302873
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.google.android.cts.deviceowner.DeviceOwnerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest
      atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest

Change-Id: Ic3fea2f0483c02623a21bc3a67ff6bd29fbcc792
parent 509f1c79
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment