Skip to content
Commit 2cc14d04 authored by Alex Johnston's avatar Alex Johnston
Browse files

Replace remaining enforceXXX methods

* Replace enforce methods with preconditions
* Replace mInjector.binderGetCallingXXX with
  getCallerIdentity.getXXX()

Removed methods:
* enforceDeviceOwnerOrManageUsers
* enforceProfileOwnerOrSystemUser
* enforceProfileOwnerOrFullCrossUsersPermission
* enforceUserUnlocked
* enforceSystemCaller
* enforceCanCallLockTaskLocked
* enforceShell
* enforcePackageIsSystemPackage
* enforceCallerSystemUserHandle

Changed Methods:
* hasDeviceOwner
* getDeviceOwnerOrganizationName
* getLastSecurityLogRetrievalTime
* getLastBugReportRequestTime
* getLastNetworkLogRetrievalTime
* getPasswordComplexity
* isCurrentInputMethodSetByOwner
* getOwnerInstalledCaCerts
* removeActiveAdmin
* isActivePasswordSufficient
* isProfileActivePasswordSufficientForParent
* isPasswordSufficientAfterProfileUnification
* getPasswordComplexity
* clearDeviceOwner
* clearProfileOwner
* uninstallPackageWithActiveAdmins
* isSeparateProfileChallengeAllowed
* choosePrivateKeyAlias
* getAlwaysOnVpnPackageForUser
* isAlwaysOnVpnLockdownEnabledForUser
* ensureCallerPackage
* getRestrictionsProvider
* isAccessibilityServicePermittedByAdmin
* isInputMethodPermittedByAdmin
* isNotificationListenerServicePermitted
* notifyLockTaskModeChanged
* getLongSupportMessageForUser
* isMeteredDataDisabledPackageForUser
* canProfileOwnerResetPasswordWhenLocked
* enforceCanSetProfileOwnerLocked
* enforceCanSetDeviceOwnerLocked
* setLockTaskPackages
* getLockTaskPackages
* setLockTaskFeatures
* forceRemoveActiveAdmin
* clearSystemUpdatePolicyFreezePeriodRecord
* forceSecurityLogs
* forceNetworkLogs
* setDefaultSmsApplication
* setApplicationHidden
* isApplicationHidden
* notifyPendingSystemUpdate
* forceUpdateUserSetupComplete
* getDoNotAskCredentialsOnBoot
* createAndManageUser
* createAdminSupportIntent
* createAdminSupportIntent
* isProvisioningAllowed
* setShortSupportMessage
* getShortSupportMessage
* setLongSupportMessage
* getLongSupportMessage
* markProfileOwnerOnOrganizationOwnedDevice
* resetPasswordWithToken
* startViewCalendarEventInManagedProfile
* getDelegatedScopes
* resetPassword
* getDelegatedScopes
* getFactoryResetProtectionPolicy
* isCallerApplicationRestrictionsManagingPackage

Bug: 167960209
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I04f27399ac057ae889fc9626194f2a112cd5fea0
parent d8f2d700
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