1 /*
2 **
3 ** Copyright 2010, The Android Open Source Project
4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
8 **
9 **     http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 */
17 
18 package android.app.admin;
19 
20 import android.app.admin.NetworkEvent;
21 import android.app.IApplicationThread;
22 import android.app.IServiceConnection;
23 import android.app.admin.SystemUpdateInfo;
24 import android.app.admin.SystemUpdatePolicy;
25 import android.app.admin.PasswordMetrics;
26 import android.content.ComponentName;
27 import android.content.Intent;
28 import android.content.IntentFilter;
29 import android.content.pm.IPackageDataObserver;
30 import android.content.pm.ParceledListSlice;
31 import android.content.pm.StringParceledListSlice;
32 import android.graphics.Bitmap;
33 import android.net.ProxyInfo;
34 import android.net.Uri;
35 import android.os.Bundle;
36 import android.os.PersistableBundle;
37 import android.os.RemoteCallback;
38 import android.os.UserHandle;
39 import android.security.keymaster.KeymasterCertificateChain;
40 import android.security.keystore.ParcelableKeyGenParameterSpec;
41 import android.telephony.data.ApnSetting;
42 
43 import java.util.List;
44 
45 /**
46  * Internal IPC interface to the device policy service.
47  * {@hide}
48  */
49 interface IDevicePolicyManager {
setPasswordQuality(in ComponentName who, int quality, boolean parent)50     void setPasswordQuality(in ComponentName who, int quality, boolean parent);
getPasswordQuality(in ComponentName who, int userHandle, boolean parent)51     int getPasswordQuality(in ComponentName who, int userHandle, boolean parent);
52 
setPasswordMinimumLength(in ComponentName who, int length, boolean parent)53     void setPasswordMinimumLength(in ComponentName who, int length, boolean parent);
getPasswordMinimumLength(in ComponentName who, int userHandle, boolean parent)54     int getPasswordMinimumLength(in ComponentName who, int userHandle, boolean parent);
55 
setPasswordMinimumUpperCase(in ComponentName who, int length, boolean parent)56     void setPasswordMinimumUpperCase(in ComponentName who, int length, boolean parent);
getPasswordMinimumUpperCase(in ComponentName who, int userHandle, boolean parent)57     int getPasswordMinimumUpperCase(in ComponentName who, int userHandle, boolean parent);
58 
setPasswordMinimumLowerCase(in ComponentName who, int length, boolean parent)59     void setPasswordMinimumLowerCase(in ComponentName who, int length, boolean parent);
getPasswordMinimumLowerCase(in ComponentName who, int userHandle, boolean parent)60     int getPasswordMinimumLowerCase(in ComponentName who, int userHandle, boolean parent);
61 
setPasswordMinimumLetters(in ComponentName who, int length, boolean parent)62     void setPasswordMinimumLetters(in ComponentName who, int length, boolean parent);
getPasswordMinimumLetters(in ComponentName who, int userHandle, boolean parent)63     int getPasswordMinimumLetters(in ComponentName who, int userHandle, boolean parent);
64 
setPasswordMinimumNumeric(in ComponentName who, int length, boolean parent)65     void setPasswordMinimumNumeric(in ComponentName who, int length, boolean parent);
getPasswordMinimumNumeric(in ComponentName who, int userHandle, boolean parent)66     int getPasswordMinimumNumeric(in ComponentName who, int userHandle, boolean parent);
67 
setPasswordMinimumSymbols(in ComponentName who, int length, boolean parent)68     void setPasswordMinimumSymbols(in ComponentName who, int length, boolean parent);
getPasswordMinimumSymbols(in ComponentName who, int userHandle, boolean parent)69     int getPasswordMinimumSymbols(in ComponentName who, int userHandle, boolean parent);
70 
setPasswordMinimumNonLetter(in ComponentName who, int length, boolean parent)71     void setPasswordMinimumNonLetter(in ComponentName who, int length, boolean parent);
getPasswordMinimumNonLetter(in ComponentName who, int userHandle, boolean parent)72     int getPasswordMinimumNonLetter(in ComponentName who, int userHandle, boolean parent);
73 
setPasswordHistoryLength(in ComponentName who, int length, boolean parent)74     void setPasswordHistoryLength(in ComponentName who, int length, boolean parent);
getPasswordHistoryLength(in ComponentName who, int userHandle, boolean parent)75     int getPasswordHistoryLength(in ComponentName who, int userHandle, boolean parent);
76 
setPasswordExpirationTimeout(in ComponentName who, long expiration, boolean parent)77     void setPasswordExpirationTimeout(in ComponentName who, long expiration, boolean parent);
getPasswordExpirationTimeout(in ComponentName who, int userHandle, boolean parent)78     long getPasswordExpirationTimeout(in ComponentName who, int userHandle, boolean parent);
79 
getPasswordExpiration(in ComponentName who, int userHandle, boolean parent)80     long getPasswordExpiration(in ComponentName who, int userHandle, boolean parent);
81 
isActivePasswordSufficient(int userHandle, boolean parent)82     boolean isActivePasswordSufficient(int userHandle, boolean parent);
isProfileActivePasswordSufficientForParent(int userHandle)83     boolean isProfileActivePasswordSufficientForParent(int userHandle);
isUsingUnifiedPassword(in ComponentName admin)84     boolean isUsingUnifiedPassword(in ComponentName admin);
getCurrentFailedPasswordAttempts(int userHandle, boolean parent)85     int getCurrentFailedPasswordAttempts(int userHandle, boolean parent);
getProfileWithMinimumFailedPasswordsForWipe(int userHandle, boolean parent)86     int getProfileWithMinimumFailedPasswordsForWipe(int userHandle, boolean parent);
87 
setMaximumFailedPasswordsForWipe(in ComponentName admin, int num, boolean parent)88     void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num, boolean parent);
getMaximumFailedPasswordsForWipe(in ComponentName admin, int userHandle, boolean parent)89     int getMaximumFailedPasswordsForWipe(in ComponentName admin, int userHandle, boolean parent);
90 
resetPassword(String password, int flags)91     boolean resetPassword(String password, int flags);
92 
setMaximumTimeToLock(in ComponentName who, long timeMs, boolean parent)93     void setMaximumTimeToLock(in ComponentName who, long timeMs, boolean parent);
getMaximumTimeToLock(in ComponentName who, int userHandle, boolean parent)94     long getMaximumTimeToLock(in ComponentName who, int userHandle, boolean parent);
95 
setRequiredStrongAuthTimeout(in ComponentName who, long timeMs, boolean parent)96     void setRequiredStrongAuthTimeout(in ComponentName who, long timeMs, boolean parent);
getRequiredStrongAuthTimeout(in ComponentName who, int userId, boolean parent)97     long getRequiredStrongAuthTimeout(in ComponentName who, int userId, boolean parent);
98 
lockNow(int flags, boolean parent)99     void lockNow(int flags, boolean parent);
100 
wipeDataWithReason(int flags, String wipeReasonForUser)101     void wipeDataWithReason(int flags, String wipeReasonForUser);
102 
setGlobalProxy(in ComponentName admin, String proxySpec, String exclusionList)103     ComponentName setGlobalProxy(in ComponentName admin, String proxySpec, String exclusionList);
getGlobalProxyAdmin(int userHandle)104     ComponentName getGlobalProxyAdmin(int userHandle);
setRecommendedGlobalProxy(in ComponentName admin, in ProxyInfo proxyInfo)105     void setRecommendedGlobalProxy(in ComponentName admin, in ProxyInfo proxyInfo);
106 
setStorageEncryption(in ComponentName who, boolean encrypt)107     int setStorageEncryption(in ComponentName who, boolean encrypt);
getStorageEncryption(in ComponentName who, int userHandle)108     boolean getStorageEncryption(in ComponentName who, int userHandle);
getStorageEncryptionStatus(in String callerPackage, int userHandle)109     int getStorageEncryptionStatus(in String callerPackage, int userHandle);
110 
requestBugreport(in ComponentName who)111     boolean requestBugreport(in ComponentName who);
112 
setCameraDisabled(in ComponentName who, boolean disabled)113     void setCameraDisabled(in ComponentName who, boolean disabled);
getCameraDisabled(in ComponentName who, int userHandle)114     boolean getCameraDisabled(in ComponentName who, int userHandle);
115 
setScreenCaptureDisabled(in ComponentName who, boolean disabled)116     void setScreenCaptureDisabled(in ComponentName who, boolean disabled);
getScreenCaptureDisabled(in ComponentName who, int userHandle)117     boolean getScreenCaptureDisabled(in ComponentName who, int userHandle);
118 
setKeyguardDisabledFeatures(in ComponentName who, int which, boolean parent)119     void setKeyguardDisabledFeatures(in ComponentName who, int which, boolean parent);
getKeyguardDisabledFeatures(in ComponentName who, int userHandle, boolean parent)120     int getKeyguardDisabledFeatures(in ComponentName who, int userHandle, boolean parent);
121 
setActiveAdmin(in ComponentName policyReceiver, boolean refreshing, int userHandle)122     void setActiveAdmin(in ComponentName policyReceiver, boolean refreshing, int userHandle);
isAdminActive(in ComponentName policyReceiver, int userHandle)123     boolean isAdminActive(in ComponentName policyReceiver, int userHandle);
getActiveAdmins(int userHandle)124     List<ComponentName> getActiveAdmins(int userHandle);
packageHasActiveAdmins(String packageName, int userHandle)125     boolean packageHasActiveAdmins(String packageName, int userHandle);
getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result, int userHandle)126     void getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result, int userHandle);
removeActiveAdmin(in ComponentName policyReceiver, int userHandle)127     void removeActiveAdmin(in ComponentName policyReceiver, int userHandle);
forceRemoveActiveAdmin(in ComponentName policyReceiver, int userHandle)128     void forceRemoveActiveAdmin(in ComponentName policyReceiver, int userHandle);
hasGrantedPolicy(in ComponentName policyReceiver, int usesPolicy, int userHandle)129     boolean hasGrantedPolicy(in ComponentName policyReceiver, int usesPolicy, int userHandle);
130 
setActivePasswordState(in PasswordMetrics metrics, int userHandle)131     void setActivePasswordState(in PasswordMetrics metrics, int userHandle);
reportPasswordChanged(int userId)132     void reportPasswordChanged(int userId);
reportFailedPasswordAttempt(int userHandle)133     void reportFailedPasswordAttempt(int userHandle);
reportSuccessfulPasswordAttempt(int userHandle)134     void reportSuccessfulPasswordAttempt(int userHandle);
reportFailedFingerprintAttempt(int userHandle)135     void reportFailedFingerprintAttempt(int userHandle);
reportSuccessfulFingerprintAttempt(int userHandle)136     void reportSuccessfulFingerprintAttempt(int userHandle);
reportKeyguardDismissed(int userHandle)137     void reportKeyguardDismissed(int userHandle);
reportKeyguardSecured(int userHandle)138     void reportKeyguardSecured(int userHandle);
139 
setDeviceOwner(in ComponentName who, String ownerName, int userId)140     boolean setDeviceOwner(in ComponentName who, String ownerName, int userId);
getDeviceOwnerComponent(boolean callingUserOnly)141     ComponentName getDeviceOwnerComponent(boolean callingUserOnly);
hasDeviceOwner()142     boolean hasDeviceOwner();
getDeviceOwnerName()143     String getDeviceOwnerName();
clearDeviceOwner(String packageName)144     void clearDeviceOwner(String packageName);
getDeviceOwnerUserId()145     int getDeviceOwnerUserId();
146 
setProfileOwner(in ComponentName who, String ownerName, int userHandle)147     boolean setProfileOwner(in ComponentName who, String ownerName, int userHandle);
getProfileOwner(int userHandle)148     ComponentName getProfileOwner(int userHandle);
getProfileOwnerName(int userHandle)149     String getProfileOwnerName(int userHandle);
setProfileEnabled(in ComponentName who)150     void setProfileEnabled(in ComponentName who);
setProfileName(in ComponentName who, String profileName)151     void setProfileName(in ComponentName who, String profileName);
clearProfileOwner(in ComponentName who)152     void clearProfileOwner(in ComponentName who);
hasUserSetupCompleted()153     boolean hasUserSetupCompleted();
154 
setDeviceOwnerLockScreenInfo(in ComponentName who, CharSequence deviceOwnerInfo)155     void setDeviceOwnerLockScreenInfo(in ComponentName who, CharSequence deviceOwnerInfo);
getDeviceOwnerLockScreenInfo()156     CharSequence getDeviceOwnerLockScreenInfo();
157 
setPackagesSuspended(in ComponentName admin, in String callerPackage, in String[] packageNames, boolean suspended)158     String[] setPackagesSuspended(in ComponentName admin, in String callerPackage, in String[] packageNames, boolean suspended);
isPackageSuspended(in ComponentName admin, in String callerPackage, String packageName)159     boolean isPackageSuspended(in ComponentName admin, in String callerPackage, String packageName);
160 
installCaCert(in ComponentName admin, String callerPackage, in byte[] certBuffer)161     boolean installCaCert(in ComponentName admin, String callerPackage, in byte[] certBuffer);
uninstallCaCerts(in ComponentName admin, String callerPackage, in String[] aliases)162     void uninstallCaCerts(in ComponentName admin, String callerPackage, in String[] aliases);
enforceCanManageCaCerts(in ComponentName admin, in String callerPackage)163     void enforceCanManageCaCerts(in ComponentName admin, in String callerPackage);
approveCaCert(in String alias, int userHandle, boolean approval)164     boolean approveCaCert(in String alias, int userHandle, boolean approval);
isCaCertApproved(in String alias, int userHandle)165     boolean isCaCertApproved(in String alias, int userHandle);
166 
installKeyPair(in ComponentName who, in String callerPackage, in byte[] privKeyBuffer, in byte[] certBuffer, in byte[] certChainBuffer, String alias, boolean requestAccess, boolean isUserSelectable)167     boolean installKeyPair(in ComponentName who, in String callerPackage, in byte[] privKeyBuffer,
168             in byte[] certBuffer, in byte[] certChainBuffer, String alias, boolean requestAccess,
169             boolean isUserSelectable);
removeKeyPair(in ComponentName who, in String callerPackage, String alias)170     boolean removeKeyPair(in ComponentName who, in String callerPackage, String alias);
generateKeyPair(in ComponentName who, in String callerPackage, in String algorithm, in ParcelableKeyGenParameterSpec keySpec, in int idAttestationFlags, out KeymasterCertificateChain attestationChain)171     boolean generateKeyPair(in ComponentName who, in String callerPackage, in String algorithm,
172             in ParcelableKeyGenParameterSpec keySpec,
173             in int idAttestationFlags, out KeymasterCertificateChain attestationChain);
setKeyPairCertificate(in ComponentName who, in String callerPackage, in String alias, in byte[] certBuffer, in byte[] certChainBuffer, boolean isUserSelectable)174     boolean setKeyPairCertificate(in ComponentName who, in String callerPackage, in String alias,
175             in byte[] certBuffer, in byte[] certChainBuffer, boolean isUserSelectable);
choosePrivateKeyAlias(int uid, in Uri uri, in String alias, IBinder aliasCallback)176     void choosePrivateKeyAlias(int uid, in Uri uri, in String alias, IBinder aliasCallback);
177 
setDelegatedScopes(in ComponentName who, in String delegatePackage, in List<String> scopes)178     void setDelegatedScopes(in ComponentName who, in String delegatePackage, in List<String> scopes);
getDelegatedScopes(in ComponentName who, String delegatePackage)179     List<String> getDelegatedScopes(in ComponentName who, String delegatePackage);
getDelegatePackages(in ComponentName who, String scope)180     List<String> getDelegatePackages(in ComponentName who, String scope);
181 
setCertInstallerPackage(in ComponentName who, String installerPackage)182     void setCertInstallerPackage(in ComponentName who, String installerPackage);
getCertInstallerPackage(in ComponentName who)183     String getCertInstallerPackage(in ComponentName who);
184 
setAlwaysOnVpnPackage(in ComponentName who, String vpnPackage, boolean lockdown)185     boolean setAlwaysOnVpnPackage(in ComponentName who, String vpnPackage, boolean lockdown);
getAlwaysOnVpnPackage(in ComponentName who)186     String getAlwaysOnVpnPackage(in ComponentName who);
187 
addPersistentPreferredActivity(in ComponentName admin, in IntentFilter filter, in ComponentName activity)188     void addPersistentPreferredActivity(in ComponentName admin, in IntentFilter filter, in ComponentName activity);
clearPackagePersistentPreferredActivities(in ComponentName admin, String packageName)189     void clearPackagePersistentPreferredActivities(in ComponentName admin, String packageName);
190 
setDefaultSmsApplication(in ComponentName admin, String packageName)191     void setDefaultSmsApplication(in ComponentName admin, String packageName);
192 
setApplicationRestrictions(in ComponentName who, in String callerPackage, in String packageName, in Bundle settings)193     void setApplicationRestrictions(in ComponentName who, in String callerPackage, in String packageName, in Bundle settings);
getApplicationRestrictions(in ComponentName who, in String callerPackage, in String packageName)194     Bundle getApplicationRestrictions(in ComponentName who, in String callerPackage, in String packageName);
setApplicationRestrictionsManagingPackage(in ComponentName admin, in String packageName)195     boolean setApplicationRestrictionsManagingPackage(in ComponentName admin, in String packageName);
getApplicationRestrictionsManagingPackage(in ComponentName admin)196     String getApplicationRestrictionsManagingPackage(in ComponentName admin);
isCallerApplicationRestrictionsManagingPackage(in String callerPackage)197     boolean isCallerApplicationRestrictionsManagingPackage(in String callerPackage);
198 
setRestrictionsProvider(in ComponentName who, in ComponentName provider)199     void setRestrictionsProvider(in ComponentName who, in ComponentName provider);
getRestrictionsProvider(int userHandle)200     ComponentName getRestrictionsProvider(int userHandle);
201 
setUserRestriction(in ComponentName who, in String key, boolean enable)202     void setUserRestriction(in ComponentName who, in String key, boolean enable);
getUserRestrictions(in ComponentName who)203     Bundle getUserRestrictions(in ComponentName who);
addCrossProfileIntentFilter(in ComponentName admin, in IntentFilter filter, int flags)204     void addCrossProfileIntentFilter(in ComponentName admin, in IntentFilter filter, int flags);
clearCrossProfileIntentFilters(in ComponentName admin)205     void clearCrossProfileIntentFilters(in ComponentName admin);
206 
setPermittedAccessibilityServices(in ComponentName admin,in List packageList)207     boolean setPermittedAccessibilityServices(in ComponentName admin,in List packageList);
getPermittedAccessibilityServices(in ComponentName admin)208     List getPermittedAccessibilityServices(in ComponentName admin);
getPermittedAccessibilityServicesForUser(int userId)209     List getPermittedAccessibilityServicesForUser(int userId);
isAccessibilityServicePermittedByAdmin(in ComponentName admin, String packageName, int userId)210     boolean isAccessibilityServicePermittedByAdmin(in ComponentName admin, String packageName, int userId);
211 
setPermittedInputMethods(in ComponentName admin,in List packageList)212     boolean setPermittedInputMethods(in ComponentName admin,in List packageList);
getPermittedInputMethods(in ComponentName admin)213     List getPermittedInputMethods(in ComponentName admin);
getPermittedInputMethodsForCurrentUser()214     List getPermittedInputMethodsForCurrentUser();
isInputMethodPermittedByAdmin(in ComponentName admin, String packageName, int userId)215     boolean isInputMethodPermittedByAdmin(in ComponentName admin, String packageName, int userId);
216 
setPermittedCrossProfileNotificationListeners(in ComponentName admin, in List<String> packageList)217     boolean setPermittedCrossProfileNotificationListeners(in ComponentName admin, in List<String> packageList);
getPermittedCrossProfileNotificationListeners(in ComponentName admin)218     List<String> getPermittedCrossProfileNotificationListeners(in ComponentName admin);
isNotificationListenerServicePermitted(in String packageName, int userId)219     boolean isNotificationListenerServicePermitted(in String packageName, int userId);
220 
createAdminSupportIntent(in String restriction)221     Intent createAdminSupportIntent(in String restriction);
setApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName, boolean hidden)222     boolean setApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName, boolean hidden);
isApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName)223     boolean isApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName);
224 
createAndManageUser(in ComponentName who, in String name, in ComponentName profileOwner, in PersistableBundle adminExtras, in int flags)225     UserHandle createAndManageUser(in ComponentName who, in String name, in ComponentName profileOwner, in PersistableBundle adminExtras, in int flags);
removeUser(in ComponentName who, in UserHandle userHandle)226     boolean removeUser(in ComponentName who, in UserHandle userHandle);
switchUser(in ComponentName who, in UserHandle userHandle)227     boolean switchUser(in ComponentName who, in UserHandle userHandle);
startUserInBackground(in ComponentName who, in UserHandle userHandle)228     int startUserInBackground(in ComponentName who, in UserHandle userHandle);
stopUser(in ComponentName who, in UserHandle userHandle)229     int stopUser(in ComponentName who, in UserHandle userHandle);
logoutUser(in ComponentName who)230     int logoutUser(in ComponentName who);
getSecondaryUsers(in ComponentName who)231     List<UserHandle> getSecondaryUsers(in ComponentName who);
232 
enableSystemApp(in ComponentName admin, in String callerPackage, in String packageName)233     void enableSystemApp(in ComponentName admin, in String callerPackage, in String packageName);
enableSystemAppWithIntent(in ComponentName admin, in String callerPackage, in Intent intent)234     int enableSystemAppWithIntent(in ComponentName admin, in String callerPackage, in Intent intent);
installExistingPackage(in ComponentName admin, in String callerPackage, in String packageName)235     boolean installExistingPackage(in ComponentName admin, in String callerPackage, in String packageName);
236 
setAccountManagementDisabled(in ComponentName who, in String accountType, in boolean disabled)237     void setAccountManagementDisabled(in ComponentName who, in String accountType, in boolean disabled);
getAccountTypesWithManagementDisabled()238     String[] getAccountTypesWithManagementDisabled();
getAccountTypesWithManagementDisabledAsUser(int userId)239     String[] getAccountTypesWithManagementDisabledAsUser(int userId);
240 
setLockTaskPackages(in ComponentName who, in String[] packages)241     void setLockTaskPackages(in ComponentName who, in String[] packages);
getLockTaskPackages(in ComponentName who)242     String[] getLockTaskPackages(in ComponentName who);
isLockTaskPermitted(in String pkg)243     boolean isLockTaskPermitted(in String pkg);
244 
setLockTaskFeatures(in ComponentName who, int flags)245     void setLockTaskFeatures(in ComponentName who, int flags);
getLockTaskFeatures(in ComponentName who)246     int getLockTaskFeatures(in ComponentName who);
247 
setGlobalSetting(in ComponentName who, in String setting, in String value)248     void setGlobalSetting(in ComponentName who, in String setting, in String value);
setSystemSetting(in ComponentName who, in String setting, in String value)249     void setSystemSetting(in ComponentName who, in String setting, in String value);
setSecureSetting(in ComponentName who, in String setting, in String value)250     void setSecureSetting(in ComponentName who, in String setting, in String value);
251 
setTime(in ComponentName who, long millis)252     boolean setTime(in ComponentName who, long millis);
setTimeZone(in ComponentName who, String timeZone)253     boolean setTimeZone(in ComponentName who, String timeZone);
254 
setMasterVolumeMuted(in ComponentName admin, boolean on)255     void setMasterVolumeMuted(in ComponentName admin, boolean on);
isMasterVolumeMuted(in ComponentName admin)256     boolean isMasterVolumeMuted(in ComponentName admin);
257 
notifyLockTaskModeChanged(boolean isEnabled, String pkg, int userId)258     void notifyLockTaskModeChanged(boolean isEnabled, String pkg, int userId);
259 
setUninstallBlocked(in ComponentName admin, in String callerPackage, in String packageName, boolean uninstallBlocked)260     void setUninstallBlocked(in ComponentName admin, in String callerPackage, in String packageName, boolean uninstallBlocked);
isUninstallBlocked(in ComponentName admin, in String packageName)261     boolean isUninstallBlocked(in ComponentName admin, in String packageName);
262 
setCrossProfileCallerIdDisabled(in ComponentName who, boolean disabled)263     void setCrossProfileCallerIdDisabled(in ComponentName who, boolean disabled);
getCrossProfileCallerIdDisabled(in ComponentName who)264     boolean getCrossProfileCallerIdDisabled(in ComponentName who);
getCrossProfileCallerIdDisabledForUser(int userId)265     boolean getCrossProfileCallerIdDisabledForUser(int userId);
setCrossProfileContactsSearchDisabled(in ComponentName who, boolean disabled)266     void setCrossProfileContactsSearchDisabled(in ComponentName who, boolean disabled);
getCrossProfileContactsSearchDisabled(in ComponentName who)267     boolean getCrossProfileContactsSearchDisabled(in ComponentName who);
getCrossProfileContactsSearchDisabledForUser(int userId)268     boolean getCrossProfileContactsSearchDisabledForUser(int userId);
startManagedQuickContact(String lookupKey, long contactId, boolean isContactIdIgnored, long directoryId, in Intent originalIntent)269     void startManagedQuickContact(String lookupKey, long contactId, boolean isContactIdIgnored, long directoryId, in Intent originalIntent);
270 
setBluetoothContactSharingDisabled(in ComponentName who, boolean disabled)271     void setBluetoothContactSharingDisabled(in ComponentName who, boolean disabled);
getBluetoothContactSharingDisabled(in ComponentName who)272     boolean getBluetoothContactSharingDisabled(in ComponentName who);
getBluetoothContactSharingDisabledForUser(int userId)273     boolean getBluetoothContactSharingDisabledForUser(int userId);
274 
setTrustAgentConfiguration(in ComponentName admin, in ComponentName agent, in PersistableBundle args, boolean parent)275     void setTrustAgentConfiguration(in ComponentName admin, in ComponentName agent,
276             in PersistableBundle args, boolean parent);
getTrustAgentConfiguration(in ComponentName admin, in ComponentName agent, int userId, boolean parent)277     List<PersistableBundle> getTrustAgentConfiguration(in ComponentName admin,
278             in ComponentName agent, int userId, boolean parent);
279 
addCrossProfileWidgetProvider(in ComponentName admin, String packageName)280     boolean addCrossProfileWidgetProvider(in ComponentName admin, String packageName);
removeCrossProfileWidgetProvider(in ComponentName admin, String packageName)281     boolean removeCrossProfileWidgetProvider(in ComponentName admin, String packageName);
getCrossProfileWidgetProviders(in ComponentName admin)282     List<String> getCrossProfileWidgetProviders(in ComponentName admin);
283 
setAutoTimeRequired(in ComponentName who, boolean required)284     void setAutoTimeRequired(in ComponentName who, boolean required);
getAutoTimeRequired()285     boolean getAutoTimeRequired();
286 
setForceEphemeralUsers(in ComponentName who, boolean forceEpehemeralUsers)287     void setForceEphemeralUsers(in ComponentName who, boolean forceEpehemeralUsers);
getForceEphemeralUsers(in ComponentName who)288     boolean getForceEphemeralUsers(in ComponentName who);
289 
isRemovingAdmin(in ComponentName adminReceiver, int userHandle)290     boolean isRemovingAdmin(in ComponentName adminReceiver, int userHandle);
291 
setUserIcon(in ComponentName admin, in Bitmap icon)292     void setUserIcon(in ComponentName admin, in Bitmap icon);
293 
setSystemUpdatePolicy(in ComponentName who, in SystemUpdatePolicy policy)294     void setSystemUpdatePolicy(in ComponentName who, in SystemUpdatePolicy policy);
getSystemUpdatePolicy()295     SystemUpdatePolicy getSystemUpdatePolicy();
clearSystemUpdatePolicyFreezePeriodRecord()296     void clearSystemUpdatePolicyFreezePeriodRecord();
297 
setKeyguardDisabled(in ComponentName admin, boolean disabled)298     boolean setKeyguardDisabled(in ComponentName admin, boolean disabled);
setStatusBarDisabled(in ComponentName who, boolean disabled)299     boolean setStatusBarDisabled(in ComponentName who, boolean disabled);
getDoNotAskCredentialsOnBoot()300     boolean getDoNotAskCredentialsOnBoot();
301 
notifyPendingSystemUpdate(in SystemUpdateInfo info)302     void notifyPendingSystemUpdate(in SystemUpdateInfo info);
getPendingSystemUpdate(in ComponentName admin)303     SystemUpdateInfo getPendingSystemUpdate(in ComponentName admin);
304 
setPermissionPolicy(in ComponentName admin, in String callerPackage, int policy)305     void setPermissionPolicy(in ComponentName admin, in String callerPackage, int policy);
getPermissionPolicy(in ComponentName admin)306     int  getPermissionPolicy(in ComponentName admin);
setPermissionGrantState(in ComponentName admin, in String callerPackage, String packageName, String permission, int grantState)307     boolean setPermissionGrantState(in ComponentName admin, in String callerPackage, String packageName,
308             String permission, int grantState);
getPermissionGrantState(in ComponentName admin, in String callerPackage, String packageName, String permission)309     int getPermissionGrantState(in ComponentName admin, in String callerPackage, String packageName, String permission);
isProvisioningAllowed(String action, String packageName)310     boolean isProvisioningAllowed(String action, String packageName);
checkProvisioningPreCondition(String action, String packageName)311     int checkProvisioningPreCondition(String action, String packageName);
setKeepUninstalledPackages(in ComponentName admin, in String callerPackage, in List<String> packageList)312     void setKeepUninstalledPackages(in ComponentName admin, in String callerPackage, in List<String> packageList);
getKeepUninstalledPackages(in ComponentName admin, in String callerPackage)313     List<String> getKeepUninstalledPackages(in ComponentName admin, in String callerPackage);
isManagedProfile(in ComponentName admin)314     boolean isManagedProfile(in ComponentName admin);
isSystemOnlyUser(in ComponentName admin)315     boolean isSystemOnlyUser(in ComponentName admin);
getWifiMacAddress(in ComponentName admin)316     String getWifiMacAddress(in ComponentName admin);
reboot(in ComponentName admin)317     void reboot(in ComponentName admin);
318 
setShortSupportMessage(in ComponentName admin, in CharSequence message)319     void setShortSupportMessage(in ComponentName admin, in CharSequence message);
getShortSupportMessage(in ComponentName admin)320     CharSequence getShortSupportMessage(in ComponentName admin);
setLongSupportMessage(in ComponentName admin, in CharSequence message)321     void setLongSupportMessage(in ComponentName admin, in CharSequence message);
getLongSupportMessage(in ComponentName admin)322     CharSequence getLongSupportMessage(in ComponentName admin);
323 
getShortSupportMessageForUser(in ComponentName admin, int userHandle)324     CharSequence getShortSupportMessageForUser(in ComponentName admin, int userHandle);
getLongSupportMessageForUser(in ComponentName admin, int userHandle)325     CharSequence getLongSupportMessageForUser(in ComponentName admin, int userHandle);
326 
isSeparateProfileChallengeAllowed(int userHandle)327     boolean isSeparateProfileChallengeAllowed(int userHandle);
328 
setOrganizationColor(in ComponentName admin, in int color)329     void setOrganizationColor(in ComponentName admin, in int color);
setOrganizationColorForUser(in int color, in int userId)330     void setOrganizationColorForUser(in int color, in int userId);
getOrganizationColor(in ComponentName admin)331     int getOrganizationColor(in ComponentName admin);
getOrganizationColorForUser(int userHandle)332     int getOrganizationColorForUser(int userHandle);
333 
setOrganizationName(in ComponentName admin, in CharSequence title)334     void setOrganizationName(in ComponentName admin, in CharSequence title);
getOrganizationName(in ComponentName admin)335     CharSequence getOrganizationName(in ComponentName admin);
getDeviceOwnerOrganizationName()336     CharSequence getDeviceOwnerOrganizationName();
getOrganizationNameForUser(int userHandle)337     CharSequence getOrganizationNameForUser(int userHandle);
338 
getUserProvisioningState()339     int getUserProvisioningState();
setUserProvisioningState(int state, int userHandle)340     void setUserProvisioningState(int state, int userHandle);
341 
setAffiliationIds(in ComponentName admin, in List<String> ids)342     void setAffiliationIds(in ComponentName admin, in List<String> ids);
getAffiliationIds(in ComponentName admin)343     List<String> getAffiliationIds(in ComponentName admin);
isAffiliatedUser()344     boolean isAffiliatedUser();
345 
setSecurityLoggingEnabled(in ComponentName admin, boolean enabled)346     void setSecurityLoggingEnabled(in ComponentName admin, boolean enabled);
isSecurityLoggingEnabled(in ComponentName admin)347     boolean isSecurityLoggingEnabled(in ComponentName admin);
retrieveSecurityLogs(in ComponentName admin)348     ParceledListSlice retrieveSecurityLogs(in ComponentName admin);
retrievePreRebootSecurityLogs(in ComponentName admin)349     ParceledListSlice retrievePreRebootSecurityLogs(in ComponentName admin);
forceSecurityLogs()350     long forceSecurityLogs();
351 
isUninstallInQueue(String packageName)352     boolean isUninstallInQueue(String packageName);
uninstallPackageWithActiveAdmins(String packageName)353     void uninstallPackageWithActiveAdmins(String packageName);
354 
isDeviceProvisioned()355     boolean isDeviceProvisioned();
isDeviceProvisioningConfigApplied()356     boolean isDeviceProvisioningConfigApplied();
setDeviceProvisioningConfigApplied()357     void setDeviceProvisioningConfigApplied();
358 
forceUpdateUserSetupComplete()359     void forceUpdateUserSetupComplete();
360 
setBackupServiceEnabled(in ComponentName admin, boolean enabled)361     void setBackupServiceEnabled(in ComponentName admin, boolean enabled);
isBackupServiceEnabled(in ComponentName admin)362     boolean isBackupServiceEnabled(in ComponentName admin);
setMandatoryBackupTransport(in ComponentName admin, in ComponentName backupTransportComponent)363     boolean setMandatoryBackupTransport(in ComponentName admin, in ComponentName backupTransportComponent);
getMandatoryBackupTransport()364     ComponentName getMandatoryBackupTransport();
365 
setNetworkLoggingEnabled(in ComponentName admin, boolean enabled)366     void setNetworkLoggingEnabled(in ComponentName admin, boolean enabled);
isNetworkLoggingEnabled(in ComponentName admin)367     boolean isNetworkLoggingEnabled(in ComponentName admin);
retrieveNetworkLogs(in ComponentName admin, long batchToken)368     List<NetworkEvent> retrieveNetworkLogs(in ComponentName admin, long batchToken);
369 
bindDeviceAdminServiceAsUser(in ComponentName admin, IApplicationThread caller, IBinder token, in Intent service, IServiceConnection connection, int flags, int targetUserId)370     boolean bindDeviceAdminServiceAsUser(in ComponentName admin,
371         IApplicationThread caller, IBinder token, in Intent service,
372         IServiceConnection connection, int flags, int targetUserId);
getBindDeviceAdminTargetUsers(in ComponentName admin)373     List<UserHandle> getBindDeviceAdminTargetUsers(in ComponentName admin);
isEphemeralUser(in ComponentName admin)374     boolean isEphemeralUser(in ComponentName admin);
375 
getLastSecurityLogRetrievalTime()376     long getLastSecurityLogRetrievalTime();
getLastBugReportRequestTime()377     long getLastBugReportRequestTime();
getLastNetworkLogRetrievalTime()378     long getLastNetworkLogRetrievalTime();
379 
setResetPasswordToken(in ComponentName admin, in byte[] token)380     boolean setResetPasswordToken(in ComponentName admin, in byte[] token);
clearResetPasswordToken(in ComponentName admin)381     boolean clearResetPasswordToken(in ComponentName admin);
isResetPasswordTokenActive(in ComponentName admin)382     boolean isResetPasswordTokenActive(in ComponentName admin);
resetPasswordWithToken(in ComponentName admin, String password, in byte[] token, int flags)383     boolean resetPasswordWithToken(in ComponentName admin, String password, in byte[] token, int flags);
384 
isCurrentInputMethodSetByOwner()385     boolean isCurrentInputMethodSetByOwner();
getOwnerInstalledCaCerts(in UserHandle user)386     StringParceledListSlice getOwnerInstalledCaCerts(in UserHandle user);
387 
clearApplicationUserData(in ComponentName admin, in String packageName, in IPackageDataObserver callback)388     void clearApplicationUserData(in ComponentName admin, in String packageName, in IPackageDataObserver callback);
389 
setLogoutEnabled(in ComponentName admin, boolean enabled)390     void setLogoutEnabled(in ComponentName admin, boolean enabled);
isLogoutEnabled()391     boolean isLogoutEnabled();
392 
getDisallowedSystemApps(in ComponentName admin, int userId, String provisioningAction)393     List<String> getDisallowedSystemApps(in ComponentName admin, int userId, String provisioningAction);
394 
transferOwnership(in ComponentName admin, in ComponentName target, in PersistableBundle bundle)395     void transferOwnership(in ComponentName admin, in ComponentName target, in PersistableBundle bundle);
getTransferOwnershipBundle()396     PersistableBundle getTransferOwnershipBundle();
397 
setStartUserSessionMessage(in ComponentName admin, in CharSequence startUserSessionMessage)398     void setStartUserSessionMessage(in ComponentName admin, in CharSequence startUserSessionMessage);
setEndUserSessionMessage(in ComponentName admin, in CharSequence endUserSessionMessage)399     void setEndUserSessionMessage(in ComponentName admin, in CharSequence endUserSessionMessage);
getStartUserSessionMessage(in ComponentName admin)400     CharSequence getStartUserSessionMessage(in ComponentName admin);
getEndUserSessionMessage(in ComponentName admin)401     CharSequence getEndUserSessionMessage(in ComponentName admin);
402 
setMeteredDataDisabledPackages(in ComponentName admin, in List<String> packageNames)403     List<String> setMeteredDataDisabledPackages(in ComponentName admin, in List<String> packageNames);
getMeteredDataDisabledPackages(in ComponentName admin)404     List<String> getMeteredDataDisabledPackages(in ComponentName admin);
405 
addOverrideApn(in ComponentName admin, in ApnSetting apnSetting)406     int addOverrideApn(in ComponentName admin, in ApnSetting apnSetting);
updateOverrideApn(in ComponentName admin, int apnId, in ApnSetting apnSetting)407     boolean updateOverrideApn(in ComponentName admin, int apnId, in ApnSetting apnSetting);
removeOverrideApn(in ComponentName admin, int apnId)408     boolean removeOverrideApn(in ComponentName admin, int apnId);
getOverrideApns(in ComponentName admin)409     List<ApnSetting> getOverrideApns(in ComponentName admin);
setOverrideApnsEnabled(in ComponentName admin, boolean enabled)410     void setOverrideApnsEnabled(in ComponentName admin, boolean enabled);
isOverrideApnEnabled(in ComponentName admin)411     boolean isOverrideApnEnabled(in ComponentName admin);
412 
isMeteredDataDisabledPackageForUser(in ComponentName admin, String packageName, int userId)413     boolean isMeteredDataDisabledPackageForUser(in ComponentName admin, String packageName, int userId);
414 }
415