blob: 97a4678070c47579b7b6e8db2b333a3d0e03ba6b [file] [log] [blame]
Dianne Hackbornd6847842010-01-12 18:14:19 -08001/*
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
Dianne Hackborn87bba1e2010-02-26 17:25:54 -080018package android.app.admin;
Dianne Hackbornd6847842010-01-12 18:14:19 -080019
Michal Karpinskif77ee4f2016-10-12 16:40:06 +010020import android.app.admin.NetworkEvent;
Tony Mak46aabe52016-11-14 12:53:06 +000021import android.app.IApplicationThread;
22import android.app.IServiceConnection;
Pavel Grafovd65799e2016-12-02 11:21:45 +000023import android.app.admin.SystemUpdateInfo;
Rubin Xud86d58c2015-05-05 16:57:37 +010024import android.app.admin.SystemUpdatePolicy;
Andrew Scull5f9e6f32016-08-02 14:22:17 +010025import android.app.admin.PasswordMetrics;
Dianne Hackbornd6847842010-01-12 18:14:19 -080026import android.content.ComponentName;
Adam Connors010cfd42014-04-16 12:48:13 +010027import android.content.Intent;
Sander Alewijnsef475ca32014-02-17 15:13:58 +000028import android.content.IntentFilter;
Rubin Xuc3cd05f2016-01-11 12:11:35 +000029import android.content.pm.ParceledListSlice;
Bartosz Fabianowski05dc9f72017-02-22 23:41:14 +010030import android.content.pm.StringParceledListSlice;
Julia Reynoldsfca04ca2015-02-17 13:39:12 -050031import android.graphics.Bitmap;
Jason Monk03bc9912014-05-13 09:44:57 -040032import android.net.ProxyInfo;
Robin Lee39087b12015-05-05 15:57:17 +010033import android.net.Uri;
Robin Lee66e5d962014-04-09 16:44:21 +010034import android.os.Bundle;
Jim Millere303bf42014-08-26 17:12:29 -070035import android.os.PersistableBundle;
Dianne Hackborn8ea138c2010-01-26 18:01:04 -080036import android.os.RemoteCallback;
Julia Reynolds1e958392014-05-16 14:25:21 -040037import android.os.UserHandle;
Andrew Scull5f9e6f32016-08-02 14:22:17 +010038
Kenny Guyfa80a4f2014-08-20 19:40:59 +010039import java.util.List;
Dianne Hackbornd6847842010-01-12 18:14:19 -080040
41/**
42 * Internal IPC interface to the device policy service.
43 * {@hide}
44 */
45interface IDevicePolicyManager {
Clara Bayarri3e826ef2015-12-14 17:51:22 +000046 void setPasswordQuality(in ComponentName who, int quality, boolean parent);
47 int getPasswordQuality(in ComponentName who, int userHandle, boolean parent);
Konstantin Lopyreva15dcfa2010-05-24 17:10:56 -070048
Esteban Talavera62399912016-01-11 15:37:55 +000049 void setPasswordMinimumLength(in ComponentName who, int length, boolean parent);
50 int getPasswordMinimumLength(in ComponentName who, int userHandle, boolean parent);
Konstantin Lopyreva15dcfa2010-05-24 17:10:56 -070051
Esteban Talavera62399912016-01-11 15:37:55 +000052 void setPasswordMinimumUpperCase(in ComponentName who, int length, boolean parent);
53 int getPasswordMinimumUpperCase(in ComponentName who, int userHandle, boolean parent);
Konstantin Lopyreva15dcfa2010-05-24 17:10:56 -070054
Esteban Talavera62399912016-01-11 15:37:55 +000055 void setPasswordMinimumLowerCase(in ComponentName who, int length, boolean parent);
56 int getPasswordMinimumLowerCase(in ComponentName who, int userHandle, boolean parent);
Konstantin Lopyreva15dcfa2010-05-24 17:10:56 -070057
Esteban Talavera62399912016-01-11 15:37:55 +000058 void setPasswordMinimumLetters(in ComponentName who, int length, boolean parent);
59 int getPasswordMinimumLetters(in ComponentName who, int userHandle, boolean parent);
Konstantin Lopyreva15dcfa2010-05-24 17:10:56 -070060
Esteban Talavera62399912016-01-11 15:37:55 +000061 void setPasswordMinimumNumeric(in ComponentName who, int length, boolean parent);
62 int getPasswordMinimumNumeric(in ComponentName who, int userHandle, boolean parent);
Konstantin Lopyreva15dcfa2010-05-24 17:10:56 -070063
Esteban Talavera62399912016-01-11 15:37:55 +000064 void setPasswordMinimumSymbols(in ComponentName who, int length, boolean parent);
65 int getPasswordMinimumSymbols(in ComponentName who, int userHandle, boolean parent);
Konstantin Lopyrevc8577402010-06-04 17:15:02 -070066
Esteban Talavera62399912016-01-11 15:37:55 +000067 void setPasswordMinimumNonLetter(in ComponentName who, int length, boolean parent);
68 int getPasswordMinimumNonLetter(in ComponentName who, int userHandle, boolean parent);
Jim Millerb8ec4702012-08-31 17:19:10 -070069
Esteban Talavera62399912016-01-11 15:37:55 +000070 void setPasswordHistoryLength(in ComponentName who, int length, boolean parent);
71 int getPasswordHistoryLength(in ComponentName who, int userHandle, boolean parent);
Konstantin Lopyrev32558232010-05-20 16:18:05 -070072
Esteban Talavera62399912016-01-11 15:37:55 +000073 void setPasswordExpirationTimeout(in ComponentName who, long expiration, boolean parent);
74 long getPasswordExpirationTimeout(in ComponentName who, int userHandle, boolean parent);
Jim Millera4e28d12010-11-08 16:15:47 -080075
Esteban Talavera62399912016-01-11 15:37:55 +000076 long getPasswordExpiration(in ComponentName who, int userHandle, boolean parent);
Jim Millera4e28d12010-11-08 16:15:47 -080077
Clara Bayarri3e826ef2015-12-14 17:51:22 +000078 boolean isActivePasswordSufficient(int userHandle, boolean parent);
Clara Bayarrid7693912016-01-22 17:26:31 +000079 boolean isProfileActivePasswordSufficientForParent(int userHandle);
Esteban Talavera62399912016-01-11 15:37:55 +000080 int getCurrentFailedPasswordAttempts(int userHandle, boolean parent);
81 int getProfileWithMinimumFailedPasswordsForWipe(int userHandle, boolean parent);
Jim Millerb8ec4702012-08-31 17:19:10 -070082
Esteban Talavera62399912016-01-11 15:37:55 +000083 void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num, boolean parent);
84 int getMaximumFailedPasswordsForWipe(in ComponentName admin, int userHandle, boolean parent);
Jim Millerb8ec4702012-08-31 17:19:10 -070085
Fyodor Kupolovbdc58c62015-01-29 13:24:03 -080086 boolean resetPassword(String password, int flags);
Jim Millerb8ec4702012-08-31 17:19:10 -070087
Esteban Talavera62399912016-01-11 15:37:55 +000088 void setMaximumTimeToLock(in ComponentName who, long timeMs, boolean parent);
89 long getMaximumTimeToLock(in ComponentName who, int userHandle, boolean parent);
Ricky Wai035e9242016-03-18 16:43:31 +000090 long getMaximumTimeToLockForUserAndProfiles(int userHandle);
Jim Millerb8ec4702012-08-31 17:19:10 -070091
Michal Karpinski8f010dd2016-06-21 15:05:53 +010092 void setRequiredStrongAuthTimeout(in ComponentName who, long timeMs, boolean parent);
93 long getRequiredStrongAuthTimeout(in ComponentName who, int userId, boolean parent);
94
Andrew Scull85a63bc2016-10-24 13:47:47 +010095 void lockNow(int flags, boolean parent);
Jim Millerb8ec4702012-08-31 17:19:10 -070096
Makoto Onuki70f929e2015-11-11 12:40:15 -080097 void wipeData(int flags);
Oscar Montemayor69238c62010-08-03 10:51:06 -070098
Fyodor Kupolovbdc58c62015-01-29 13:24:03 -080099 ComponentName setGlobalProxy(in ComponentName admin, String proxySpec, String exclusionList);
Amith Yamasani599dd7c2012-09-14 23:20:08 -0700100 ComponentName getGlobalProxyAdmin(int userHandle);
Jason Monk03bc9912014-05-13 09:44:57 -0400101 void setRecommendedGlobalProxy(in ComponentName admin, in ProxyInfo proxyInfo);
Andy Stadler7b0f8f02011-01-12 14:59:52 -0800102
Fyodor Kupolovbdc58c62015-01-29 13:24:03 -0800103 int setStorageEncryption(in ComponentName who, boolean encrypt);
Amith Yamasani599dd7c2012-09-14 23:20:08 -0700104 boolean getStorageEncryption(in ComponentName who, int userHandle);
Makoto Onukid4c9e542016-02-25 18:17:30 -0800105 int getStorageEncryptionStatus(in String callerPackage, int userHandle);
Andy Stadler7b0f8f02011-01-12 14:59:52 -0800106
Michal Karpinski3fc437e2015-12-15 10:09:00 +0000107 boolean requestBugreport(in ComponentName who);
108
Fyodor Kupolovbdc58c62015-01-29 13:24:03 -0800109 void setCameraDisabled(in ComponentName who, boolean disabled);
Amith Yamasani599dd7c2012-09-14 23:20:08 -0700110 boolean getCameraDisabled(in ComponentName who, int userHandle);
Ben Komalo2447edd2011-05-09 16:05:33 -0700111
Fyodor Kupolovbdc58c62015-01-29 13:24:03 -0800112 void setScreenCaptureDisabled(in ComponentName who, boolean disabled);
Sander Alewijnsed2a1eec2014-07-09 12:57:05 +0100113 boolean getScreenCaptureDisabled(in ComponentName who, int userHandle);
114
Esteban Talavera62399912016-01-11 15:37:55 +0000115 void setKeyguardDisabledFeatures(in ComponentName who, int which, boolean parent);
116 int getKeyguardDisabledFeatures(in ComponentName who, int userHandle, boolean parent);
Jim Millerb8ec4702012-08-31 17:19:10 -0700117
Amith Yamasani599dd7c2012-09-14 23:20:08 -0700118 void setActiveAdmin(in ComponentName policyReceiver, boolean refreshing, int userHandle);
119 boolean isAdminActive(in ComponentName policyReceiver, int userHandle);
120 List<ComponentName> getActiveAdmins(int userHandle);
121 boolean packageHasActiveAdmins(String packageName, int userHandle);
122 void getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result, int userHandle);
123 void removeActiveAdmin(in ComponentName policyReceiver, int userHandle);
Kenny Guy38dcca52016-04-19 13:09:18 +0100124 void forceRemoveActiveAdmin(in ComponentName policyReceiver, int userHandle);
Amith Yamasani599dd7c2012-09-14 23:20:08 -0700125 boolean hasGrantedPolicy(in ComponentName policyReceiver, int usesPolicy, int userHandle);
Jim Millerb8ec4702012-08-31 17:19:10 -0700126
Andrew Scull5f9e6f32016-08-02 14:22:17 +0100127 void setActivePasswordState(in PasswordMetrics metrics, int userHandle);
Andrew Scull5daf2732016-11-14 15:02:45 +0000128 void reportPasswordChanged(int userId);
Amith Yamasani599dd7c2012-09-14 23:20:08 -0700129 void reportFailedPasswordAttempt(int userHandle);
130 void reportSuccessfulPasswordAttempt(int userHandle);
Michal Karpinskied5c8f02016-02-09 15:43:41 +0000131 void reportFailedFingerprintAttempt(int userHandle);
132 void reportSuccessfulFingerprintAttempt(int userHandle);
133 void reportKeyguardDismissed(int userHandle);
134 void reportKeyguardSecured(int userHandle);
Michal Karpinski31502d32016-01-25 16:43:07 +0000135
Makoto Onukia52562c2015-10-01 16:12:31 -0700136 boolean setDeviceOwner(in ComponentName who, String ownerName, int userId);
Makoto Onukic8a5a552015-11-19 14:29:12 -0800137 ComponentName getDeviceOwnerComponent(boolean callingUserOnly);
Bartosz Fabianowskidd7f8da2016-11-30 11:09:22 +0100138 boolean hasDeviceOwner();
Geoffrey Borggaard334c7e32013-08-08 14:31:36 -0400139 String getDeviceOwnerName();
Jason Monkb0dced82014-06-06 14:36:20 -0400140 void clearDeviceOwner(String packageName);
Makoto Onukic8a5a552015-11-19 14:29:12 -0800141 int getDeviceOwnerUserId();
Maggie Benthallda51e682013-08-08 22:35:44 -0400142
Amith Yamasanibf3a9462014-07-28 14:26:42 -0700143 boolean setProfileOwner(in ComponentName who, String ownerName, int userHandle);
144 ComponentName getProfileOwner(int userHandle);
Adam Connors776c5552014-01-09 10:42:56 +0000145 String getProfileOwnerName(int userHandle);
Alexandra Gherghina512675b2014-04-02 11:23:54 +0100146 void setProfileEnabled(in ComponentName who);
Jessica Hummel1333ea12014-06-23 11:20:10 +0100147 void setProfileName(in ComponentName who, String profileName);
Amith Yamasanibf3a9462014-07-28 14:26:42 -0700148 void clearProfileOwner(in ComponentName who);
149 boolean hasUserSetupCompleted();
Adam Connors776c5552014-01-09 10:42:56 +0000150
Andrei Stingaceanu16187902016-03-21 15:44:45 +0000151 void setDeviceOwnerLockScreenInfo(in ComponentName who, CharSequence deviceOwnerInfo);
152 CharSequence getDeviceOwnerLockScreenInfo();
Andrei Stingaceanu6644cd92015-11-10 13:03:31 +0000153
Edman Anjos52088e42017-01-13 22:26:17 +0100154 String[] setPackagesSuspended(in ComponentName admin, in String callerPackage, in String[] packageNames, boolean suspended);
155 boolean isPackageSuspended(in ComponentName admin, in String callerPackage, String packageName);
Andrei Stingaceanu1e283912015-11-26 15:26:28 +0000156
Edman Anjosf9946772016-11-28 16:35:15 +0100157 boolean installCaCert(in ComponentName admin, String callerPackage, in byte[] certBuffer);
158 void uninstallCaCerts(in ComponentName admin, String callerPackage, in String[] aliases);
159 void enforceCanManageCaCerts(in ComponentName admin, in String callerPackage);
Robin Lee2f7e1e42016-03-21 10:50:01 +0000160 boolean approveCaCert(in String alias, int userHandle, boolean approval);
161 boolean isCaCertApproved(in String alias, int userHandle);
Sander Alewijnsef475ca32014-02-17 15:13:58 +0000162
Edman Anjosf9946772016-11-28 16:35:15 +0100163 boolean installKeyPair(in ComponentName who, in String callerPackage, in byte[] privKeyBuffer,
164 in byte[] certBuffer, in byte[] certChainBuffer, String alias, boolean requestAccess);
165 boolean removeKeyPair(in ComponentName who, in String callerPackage, String alias);
Robin Lee39087b12015-05-05 15:57:17 +0100166 void choosePrivateKeyAlias(int uid, in Uri uri, in String alias, IBinder aliasCallback);
Bernhard Bauer26408cc2014-09-08 14:07:31 +0100167
Edman Anjosf9946772016-11-28 16:35:15 +0100168 void setDelegatedScopes(in ComponentName who, in String delegatePackage, in List<String> scopes);
169 List<String> getDelegatedScopes(in ComponentName who, String delegatePackage);
170 List<String> getDelegatePackages(in ComponentName who, String scope);
171
Rubin Xuec32b562015-03-03 17:34:05 +0000172 void setCertInstallerPackage(in ComponentName who, String installerPackage);
173 String getCertInstallerPackage(in ComponentName who);
174
Robin Leedc679712016-05-03 13:23:03 +0100175 boolean setAlwaysOnVpnPackage(in ComponentName who, String vpnPackage, boolean lockdown);
Robin Lee244ce8e2016-01-05 18:03:46 +0000176 String getAlwaysOnVpnPackage(in ComponentName who);
177
Sander Alewijnsef475ca32014-02-17 15:13:58 +0000178 void addPersistentPreferredActivity(in ComponentName admin, in IntentFilter filter, in ComponentName activity);
179 void clearPackagePersistentPreferredActivities(in ComponentName admin, String packageName);
Robin Lee66e5d962014-04-09 16:44:21 +0100180
Edman Anjosf9946772016-11-28 16:35:15 +0100181 void setApplicationRestrictions(in ComponentName who, in String callerPackage, in String packageName, in Bundle settings);
182 Bundle getApplicationRestrictions(in ComponentName who, in String callerPackage, in String packageName);
Victor Changcd14c0a2016-03-16 19:10:15 +0000183 boolean setApplicationRestrictionsManagingPackage(in ComponentName admin, in String packageName);
Esteban Talaverabf60f722015-12-10 16:26:44 +0000184 String getApplicationRestrictionsManagingPackage(in ComponentName admin);
Edman Anjosf9946772016-11-28 16:35:15 +0100185 boolean isCallerApplicationRestrictionsManagingPackage(in String callerPackage);
Amith Yamasanibe465322014-04-24 13:45:17 -0700186
Amith Yamasanif20d6402014-05-24 15:34:37 -0700187 void setRestrictionsProvider(in ComponentName who, in ComponentName provider);
188 ComponentName getRestrictionsProvider(int userHandle);
189
Amith Yamasanibe465322014-04-24 13:45:17 -0700190 void setUserRestriction(in ComponentName who, in String key, boolean enable);
Sudheer Shanka549b9692016-03-30 17:12:07 -0700191 Bundle getUserRestrictions(in ComponentName who);
Nicolas Prevot81948992014-05-16 18:25:26 +0100192 void addCrossProfileIntentFilter(in ComponentName admin, in IntentFilter filter, int flags);
193 void clearCrossProfileIntentFilters(in ComponentName admin);
Adam Connors010cfd42014-04-16 12:48:13 +0100194
Kenny Guyfa80a4f2014-08-20 19:40:59 +0100195 boolean setPermittedAccessibilityServices(in ComponentName admin,in List packageList);
196 List getPermittedAccessibilityServices(in ComponentName admin);
197 List getPermittedAccessibilityServicesForUser(int userId);
Sudheer Shanka56925862016-01-28 19:43:59 +0000198 boolean isAccessibilityServicePermittedByAdmin(in ComponentName admin, String packageName, int userId);
Kenny Guyfa80a4f2014-08-20 19:40:59 +0100199
200 boolean setPermittedInputMethods(in ComponentName admin,in List packageList);
201 List getPermittedInputMethods(in ComponentName admin);
202 List getPermittedInputMethodsForCurrentUser();
Sudheer Shanka56925862016-01-28 19:43:59 +0000203 boolean isInputMethodPermittedByAdmin(in ComponentName admin, String packageName, int userId);
Kenny Guyfa80a4f2014-08-20 19:40:59 +0100204
phweiss73145f42017-01-17 19:06:38 +0100205 Intent createAdminSupportIntent(in String restriction);
Edman Anjos52088e42017-01-13 22:26:17 +0100206 boolean setApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName, boolean hidden);
207 boolean isApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName);
Julia Reynolds966881e2014-05-14 12:23:08 -0400208
phweissa92e1212016-01-25 17:14:10 +0100209 UserHandle createAndManageUser(in ComponentName who, in String name, in ComponentName profileOwner, in PersistableBundle adminExtras, in int flags);
Julia Reynolds1e958392014-05-16 14:25:21 -0400210 boolean removeUser(in ComponentName who, in UserHandle userHandle);
Jason Monk582d9112014-07-09 19:57:08 -0400211 boolean switchUser(in ComponentName who, in UserHandle userHandle);
Julia Reynolds1e958392014-05-16 14:25:21 -0400212
Edman Anjos52088e42017-01-13 22:26:17 +0100213 void enableSystemApp(in ComponentName admin, in String callerPackage, in String packageName);
214 int enableSystemAppWithIntent(in ComponentName admin, in String callerPackage, in Intent intent);
Adam Connors655be2a2014-07-14 09:01:25 +0000215
Sander Alewijnse5c02db62014-05-07 10:46:57 +0100216 void setAccountManagementDisabled(in ComponentName who, in String accountType, in boolean disabled);
217 String[] getAccountTypesWithManagementDisabled();
Alexandra Gherghina999d3942014-07-03 11:40:08 +0100218 String[] getAccountTypesWithManagementDisabledAsUser(int userId);
justinzhang511e0d82014-03-24 16:09:24 -0400219
Jason Monk48aacba2014-08-13 16:29:08 -0400220 void setLockTaskPackages(in ComponentName who, in String[] packages);
221 String[] getLockTaskPackages(in ComponentName who);
Jason Monkd7b86212014-06-16 13:15:38 -0400222 boolean isLockTaskPermitted(in String pkg);
Julia Reynoldsda551652014-05-14 17:15:16 -0400223
224 void setGlobalSetting(in ComponentName who, in String setting, in String value);
225 void setSecureSetting(in ComponentName who, in String setting, in String value);
Julia Reynolds4a21b252014-06-04 11:11:43 -0400226
227 void setMasterVolumeMuted(in ComponentName admin, boolean on);
228 boolean isMasterVolumeMuted(in ComponentName admin);
Jason Monk35c62a42014-06-17 10:24:47 -0400229
230 void notifyLockTaskModeChanged(boolean isEnabled, String pkg, int userId);
Kenny Guyc13053b2014-05-29 14:17:17 +0100231
Edman Anjosa5f2fb12016-12-19 11:25:54 -0800232 void setUninstallBlocked(in ComponentName admin, in String callerPackage, in String packageName, boolean uninstallBlocked);
Esteban Talavera729b2a62014-08-27 18:01:58 +0100233 boolean isUninstallBlocked(in ComponentName admin, in String packageName);
Adam Connors210fe212014-07-17 15:41:43 +0100234
235 void setCrossProfileCallerIdDisabled(in ComponentName who, boolean disabled);
236 boolean getCrossProfileCallerIdDisabled(in ComponentName who);
237 boolean getCrossProfileCallerIdDisabledForUser(int userId);
Victor Chang1060c6182016-01-04 20:16:23 +0000238 void setCrossProfileContactsSearchDisabled(in ComponentName who, boolean disabled);
239 boolean getCrossProfileContactsSearchDisabled(in ComponentName who);
240 boolean getCrossProfileContactsSearchDisabledForUser(int userId);
Victor Chang97bdacc2016-01-21 22:24:11 +0000241 void startManagedQuickContact(String lookupKey, long contactId, boolean isContactIdIgnored, long directoryId, in Intent originalIntent);
Jim Miller604e7552014-07-18 19:00:02 -0700242
Ricky Wai778ba132015-03-31 14:21:22 +0100243 void setBluetoothContactSharingDisabled(in ComponentName who, boolean disabled);
244 boolean getBluetoothContactSharingDisabled(in ComponentName who);
245 boolean getBluetoothContactSharingDisabledForUser(int userId);
246
Jim Millere303bf42014-08-26 17:12:29 -0700247 void setTrustAgentConfiguration(in ComponentName admin, in ComponentName agent,
Tony Mak089d8402016-04-05 17:42:55 +0100248 in PersistableBundle args, boolean parent);
Jim Millere303bf42014-08-26 17:12:29 -0700249 List<PersistableBundle> getTrustAgentConfiguration(in ComponentName admin,
Tony Mak089d8402016-04-05 17:42:55 +0100250 in ComponentName agent, int userId, boolean parent);
Jim Miller604e7552014-07-18 19:00:02 -0700251
Svetoslav976e8bd2014-07-16 15:12:03 -0700252 boolean addCrossProfileWidgetProvider(in ComponentName admin, String packageName);
253 boolean removeCrossProfileWidgetProvider(in ComponentName admin, String packageName);
254 List<String> getCrossProfileWidgetProviders(in ComponentName admin);
Sander Alewijnse0ced6272014-08-26 11:18:26 +0100255
Fyodor Kupolovbdc58c62015-01-29 13:24:03 -0800256 void setAutoTimeRequired(in ComponentName who, boolean required);
Sander Alewijnse0ced6272014-08-26 11:18:26 +0100257 boolean getAutoTimeRequired();
Fyodor Kupolov96fb9322014-12-01 15:08:09 -0800258
Lenka Trochtovaf348e8e2016-01-07 17:20:34 +0100259 void setForceEphemeralUsers(in ComponentName who, boolean forceEpehemeralUsers);
260 boolean getForceEphemeralUsers(in ComponentName who);
261
Fyodor Kupolov96fb9322014-12-01 15:08:09 -0800262 boolean isRemovingAdmin(in ComponentName adminReceiver, int userHandle);
Julia Reynolds20118f12015-02-11 12:34:08 -0500263
Julia Reynoldsfca04ca2015-02-17 13:39:12 -0500264 void setUserIcon(in ComponentName admin, in Bitmap icon);
Craig Lafayettedbe31a62015-04-02 13:14:39 -0400265
Rubin Xud86d58c2015-05-05 16:57:37 +0100266 void setSystemUpdatePolicy(in ComponentName who, in SystemUpdatePolicy policy);
267 SystemUpdatePolicy getSystemUpdatePolicy();
Benjamin Franze36087e2015-04-07 16:40:34 +0100268
Benjamin Franzbece8062015-05-06 12:14:31 +0100269 boolean setKeyguardDisabled(in ComponentName admin, boolean disabled);
270 boolean setStatusBarDisabled(in ComponentName who, boolean disabled);
Andrei Kapishnikov4eb6a362015-04-02 15:21:20 -0400271 boolean getDoNotAskCredentialsOnBoot();
Rubin Xudc105cc2015-04-14 23:38:01 +0100272
Charles Hedea0c3b2017-01-13 10:04:12 +0000273 void notifyPendingSystemUpdate(in SystemUpdateInfo info);
Pavel Grafovd65799e2016-12-02 11:21:45 +0000274 SystemUpdateInfo getPendingSystemUpdate(in ComponentName admin);
Amith Yamasanid49489b2015-04-28 14:00:26 -0700275
Edman Anjos52088e42017-01-13 22:26:17 +0100276 void setPermissionPolicy(in ComponentName admin, in String callerPackage, int policy);
Amith Yamasanid49489b2015-04-28 14:00:26 -0700277 int getPermissionPolicy(in ComponentName admin);
Edman Anjos52088e42017-01-13 22:26:17 +0100278 boolean setPermissionGrantState(in ComponentName admin, in String callerPackage, String packageName,
Svet Ganovd8ecc5a2015-05-20 10:45:43 -0700279 String permission, int grantState);
Edman Anjos52088e42017-01-13 22:26:17 +0100280 int getPermissionGrantState(in ComponentName admin, in String callerPackage, String packageName, String permission);
Esteban Talavera01576862016-12-15 11:16:44 +0000281 boolean isProvisioningAllowed(String action, String packageName);
282 int checkProvisioningPreCondition(String action, String packageName);
Edman Anjos52088e42017-01-13 22:26:17 +0100283 void setKeepUninstalledPackages(in ComponentName admin, in String callerPackage, in List<String> packageList);
284 List<String> getKeepUninstalledPackages(in ComponentName admin, in String callerPackage);
Mahaver Chopra15a46b02015-11-11 14:54:35 +0000285 boolean isManagedProfile(in ComponentName admin);
286 boolean isSystemOnlyUser(in ComponentName admin);
Sudheer Shanka3cb4da12016-03-07 18:51:49 -0800287 String getWifiMacAddress(in ComponentName admin);
Mahaver Chopra1ce53bc2015-12-14 13:35:14 +0000288 void reboot(in ComponentName admin);
Kenny Guy06de4e72015-12-22 12:07:39 +0000289
Sudheer Shanka3ccca91e2016-04-11 21:36:17 -0700290 void setShortSupportMessage(in ComponentName admin, in CharSequence message);
291 CharSequence getShortSupportMessage(in ComponentName admin);
292 void setLongSupportMessage(in ComponentName admin, in CharSequence message);
293 CharSequence getLongSupportMessage(in ComponentName admin);
Kenny Guy06de4e72015-12-22 12:07:39 +0000294
Sudheer Shanka3ccca91e2016-04-11 21:36:17 -0700295 CharSequence getShortSupportMessageForUser(in ComponentName admin, int userHandle);
296 CharSequence getLongSupportMessageForUser(in ComponentName admin, int userHandle);
Clara Bayarria1771112015-12-18 16:29:18 +0000297
298 boolean isSeparateProfileChallengeAllowed(int userHandle);
Benjamin Franz59720bb2016-01-18 15:26:11 +0000299
300 void setOrganizationColor(in ComponentName admin, in int color);
Nicolas Prevot8f7698a2016-02-11 16:05:33 +0000301 void setOrganizationColorForUser(in int color, in int userId);
Benjamin Franz59720bb2016-01-18 15:26:11 +0000302 int getOrganizationColor(in ComponentName admin);
303 int getOrganizationColorForUser(int userHandle);
Bartosz Fabianowski4c052f22016-01-25 14:18:43 +0100304
Michal Karpinski74cd7302016-04-12 15:17:36 +0100305 void setOrganizationName(in ComponentName admin, in CharSequence title);
306 CharSequence getOrganizationName(in ComponentName admin);
Bartosz Fabianowski365a3db2016-11-30 18:28:10 +0100307 CharSequence getDeviceOwnerOrganizationName();
Michal Karpinski74cd7302016-04-12 15:17:36 +0100308 CharSequence getOrganizationNameForUser(int userHandle);
Benjamin Franz3e8a7092016-01-25 16:19:08 +0000309
Alan Treadwayafad8782016-01-19 15:15:08 +0000310 int getUserProvisioningState();
311 void setUserProvisioningState(int state, int userHandle);
312
Bartosz Fabianowski4c052f22016-01-25 14:18:43 +0100313 void setAffiliationIds(in ComponentName admin, in List<String> ids);
Esteban Talaverac9bb3782016-11-11 15:41:14 +0000314 List<String> getAffiliationIds(in ComponentName admin);
Bartosz Fabianowski4c052f22016-01-25 14:18:43 +0100315 boolean isAffiliatedUser();
Rubin Xuc3cd05f2016-01-11 12:11:35 +0000316
Michal Karpinski6235a942016-03-15 12:07:23 +0000317 void setSecurityLoggingEnabled(in ComponentName admin, boolean enabled);
318 boolean isSecurityLoggingEnabled(in ComponentName admin);
319 ParceledListSlice retrieveSecurityLogs(in ComponentName admin);
320 ParceledListSlice retrievePreRebootSecurityLogs(in ComponentName admin);
Suprabh Shuklaa2ae2232016-01-28 18:05:14 -0800321
322 boolean isUninstallInQueue(String packageName);
323 void uninstallPackageWithActiveAdmins(String packageName);
Mahaver Chopra790d1982016-07-07 16:06:49 +0100324
325 boolean isDeviceProvisioned();
Benjamin Franz2aa9bab2016-07-11 19:10:36 +0100326 boolean isDeviceProvisioningConfigApplied();
327 void setDeviceProvisioningConfigApplied();
Victor Chang9bfc65f2016-08-15 12:27:09 +0100328
329 void forceUpdateUserSetupComplete();
Vladislav Kuzkokova8202522016-08-18 19:01:27 +0200330
331 void setBackupServiceEnabled(in ComponentName admin, boolean enabled);
332 boolean isBackupServiceEnabled(in ComponentName admin);
Michal Karpinskidd9bb4f2016-10-12 14:59:26 +0100333
334 void setNetworkLoggingEnabled(in ComponentName admin, boolean enabled);
335 boolean isNetworkLoggingEnabled(in ComponentName admin);
Michal Karpinskia9ff2062016-11-03 15:46:17 +0000336 List<NetworkEvent> retrieveNetworkLogs(in ComponentName admin, long batchToken);
Tony Mak46aabe52016-11-14 12:53:06 +0000337
338 boolean bindDeviceAdminServiceAsUser(in ComponentName admin,
339 IApplicationThread caller, IBinder token, in Intent service,
340 IServiceConnection connection, int flags, int targetUserId);
Esteban Talaverafc291bc2016-11-21 13:52:03 +0000341 List<UserHandle> getBindDeviceAdminTargetUsers(in ComponentName admin);
Bartosz Fabianowskib21b2412016-11-17 04:53:33 +0100342
343 long getLastSecurityLogRetrievalTime();
344 long getLastBugReportRequestTime();
345 long getLastNetworkLogRetrievalTime();
Rubin Xuaab7a412016-12-30 21:13:29 +0000346
347 boolean setResetPasswordToken(in ComponentName admin, in byte[] token);
348 boolean clearResetPasswordToken(in ComponentName admin);
349 boolean isResetPasswordTokenActive(in ComponentName admin);
350 boolean resetPasswordWithToken(in ComponentName admin, String password, in byte[] token, int flags);
Bartosz Fabianowskiaff5e9c2017-01-25 06:09:13 +0100351
352 boolean isDefaultInputMethodSetByOwner(in UserHandle user);
Bartosz Fabianowski05dc9f72017-02-22 23:41:14 +0100353 StringParceledListSlice getOwnerInstalledCaCerts(in UserHandle user);
Dianne Hackbornd6847842010-01-12 18:14:19 -0800354}