| 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.accounts.Account; |
| 21 |
import android.app.admin.DevicePolicyDrawableResource; |
| 22 |
import android.app.admin.DevicePolicyStringResource; |
| 23 |
import android.app.admin.ParcelableResource; |
| 24 |
import android.app.admin.NetworkEvent; |
| 25 |
import android.app.IApplicationThread; |
| 26 |
import android.app.IServiceConnection; |
| 27 |
import android.app.admin.ParcelableGranteeMap; |
| 28 |
import android.app.admin.PreferentialNetworkServiceConfig; |
| 29 |
import android.app.admin.StartInstallingUpdateCallback; |
| 30 |
import android.app.admin.SystemUpdateInfo; |
| 31 |
import android.app.admin.SystemUpdatePolicy; |
| 32 |
import android.app.admin.PasswordMetrics; |
| 33 |
import android.app.admin.FactoryResetProtectionPolicy; |
| 34 |
import android.app.admin.ManagedProfileProvisioningParams; |
| 35 |
import android.app.admin.FullyManagedDeviceProvisioningParams; |
| 36 |
import android.app.admin.WifiSsidPolicy; |
| 37 |
import android.content.ComponentName; |
| 38 |
import android.content.Intent; |
| 39 |
import android.content.IntentFilter; |
| 40 |
import android.content.pm.IPackageDataObserver; |
| 41 |
import android.content.pm.ParceledListSlice; |
| 42 |
import android.content.pm.StringParceledListSlice; |
| 43 |
import android.graphics.Bitmap; |
| 44 |
import android.net.ProxyInfo; |
| 45 |
import android.net.Uri; |
| 46 |
import android.os.Bundle; |
| 47 |
import android.os.PersistableBundle; |
| 48 |
import android.os.RemoteCallback; |
| 49 |
import android.os.UserHandle; |
| 50 |
import android.security.keymaster.KeymasterCertificateChain; |
| 51 |
import android.security.keystore.ParcelableKeyGenParameterSpec; |
| 52 |
import android.telephony.data.ApnSetting; |
| 53 |
import com.android.internal.infra.AndroidFuture; |
| 54 |
|
| 55 |
import java.util.List; |
| 56 |
|
| 57 |
/** |
| 58 |
* Internal IPC interface to the device policy service. |
| 59 |
* {@hide} |
| 60 |
*/ |
| 61 |
interface IDevicePolicyManager { |
| 62 |
void setPasswordQuality(in ComponentName who, int quality, boolean parent); |
| 63 |
int getPasswordQuality(in ComponentName who, int userHandle, boolean parent); |
| 64 |
|
| 65 |
void setPasswordMinimumLength(in ComponentName who, int length, boolean parent); |
| 66 |
int getPasswordMinimumLength(in ComponentName who, int userHandle, boolean parent); |
| 67 |
|
| 68 |
void setPasswordMinimumUpperCase(in ComponentName who, int length, boolean parent); |
| 69 |
int getPasswordMinimumUpperCase(in ComponentName who, int userHandle, boolean parent); |
| 70 |
|
| 71 |
void setPasswordMinimumLowerCase(in ComponentName who, int length, boolean parent); |
| 72 |
int getPasswordMinimumLowerCase(in ComponentName who, int userHandle, boolean parent); |
| 73 |
|
| 74 |
void setPasswordMinimumLetters(in ComponentName who, int length, boolean parent); |
| 75 |
int getPasswordMinimumLetters(in ComponentName who, int userHandle, boolean parent); |
| 76 |
|
| 77 |
void setPasswordMinimumNumeric(in ComponentName who, int length, boolean parent); |
| 78 |
int getPasswordMinimumNumeric(in ComponentName who, int userHandle, boolean parent); |
| 79 |
|
| 80 |
void setPasswordMinimumSymbols(in ComponentName who, int length, boolean parent); |
| 81 |
int getPasswordMinimumSymbols(in ComponentName who, int userHandle, boolean parent); |
| 82 |
|
| 83 |
void setPasswordMinimumNonLetter(in ComponentName who, int length, boolean parent); |
| 84 |
int getPasswordMinimumNonLetter(in ComponentName who, int userHandle, boolean parent); |
| 85 |
|
| 86 |
PasswordMetrics getPasswordMinimumMetrics(int userHandle, boolean deviceWideOnly); |
| 87 |
|
| 88 |
void setPasswordHistoryLength(in ComponentName who, int length, boolean parent); |
| 89 |
int getPasswordHistoryLength(in ComponentName who, int userHandle, boolean parent); |
| 90 |
|
| 91 |
void setPasswordExpirationTimeout(in ComponentName who, long expiration, boolean parent); |
| 92 |
long getPasswordExpirationTimeout(in ComponentName who, int userHandle, boolean parent); |
| 93 |
|
| 94 |
long getPasswordExpiration(in ComponentName who, int userHandle, boolean parent); |
| 95 |
|
| 96 |
boolean isActivePasswordSufficient(int userHandle, boolean parent); |
| 97 |
boolean isActivePasswordSufficientForDeviceRequirement(); |
| 98 |
boolean isPasswordSufficientAfterProfileUnification(int userHandle, int profileUser); |
| 99 |
int getPasswordComplexity(boolean parent); |
| 100 |
void setRequiredPasswordComplexity(int passwordComplexity, boolean parent); |
| 101 |
int getRequiredPasswordComplexity(boolean parent); |
| 102 |
int getAggregatedPasswordComplexityForUser(int userId, boolean deviceWideOnly); |
| 103 |
boolean isUsingUnifiedPassword(in ComponentName admin); |
| 104 |
int getCurrentFailedPasswordAttempts(int userHandle, boolean parent); |
| 105 |
int getProfileWithMinimumFailedPasswordsForWipe(int userHandle, boolean parent); |
| 106 |
|
| 107 |
void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num, boolean parent); |
| 108 |
int getMaximumFailedPasswordsForWipe(in ComponentName admin, int userHandle, boolean parent); |
| 109 |
|
| 110 |
boolean resetPassword(String password, int flags); |
| 111 |
|
| 112 |
void setMaximumTimeToLock(in ComponentName who, long timeMs, boolean parent); |
| 113 |
long getMaximumTimeToLock(in ComponentName who, int userHandle, boolean parent); |
| 114 |
|
| 115 |
void setRequiredStrongAuthTimeout(in ComponentName who, long timeMs, boolean parent); |
| 116 |
long getRequiredStrongAuthTimeout(in ComponentName who, int userId, boolean parent); |
| 117 |
|
| 118 |
void lockNow(int flags, boolean parent); |
| 119 |
|
| 120 |
void wipeDataWithReason(int flags, String wipeReasonForUser, boolean parent); |
| 121 |
|
| 122 |
void setFactoryResetProtectionPolicy(in ComponentName who, in FactoryResetProtectionPolicy policy); |
| 123 |
FactoryResetProtectionPolicy getFactoryResetProtectionPolicy(in ComponentName who); |
| 124 |
boolean isFactoryResetProtectionPolicySupported(); |
| 125 |
|
| 126 |
void sendLostModeLocationUpdate(in AndroidFuture<boolean> future); |
| 127 |
|
| 128 |
ComponentName setGlobalProxy(in ComponentName admin, String proxySpec, String exclusionList); |
| 129 |
ComponentName getGlobalProxyAdmin(int userHandle); |
| 130 |
void setRecommendedGlobalProxy(in ComponentName admin, in ProxyInfo proxyInfo); |
| 131 |
|
| 132 |
int setStorageEncryption(in ComponentName who, boolean encrypt); |
| 133 |
boolean getStorageEncryption(in ComponentName who, int userHandle); |
| 134 |
int getStorageEncryptionStatus(in String callerPackage, int userHandle); |
| 135 |
|
| 136 |
boolean requestBugreport(in ComponentName who); |
| 137 |
|
| 138 |
void setCameraDisabled(in ComponentName who, boolean disabled, boolean parent); |
| 139 |
boolean getCameraDisabled(in ComponentName who, int userHandle, boolean parent); |
| 140 |
|
| 141 |
void setScreenCaptureDisabled(in ComponentName who, boolean disabled, boolean parent); |
| 142 |
boolean getScreenCaptureDisabled(in ComponentName who, int userHandle, boolean parent); |
| 143 |
|
| 144 |
void setNearbyNotificationStreamingPolicy(int policy); |
| 145 |
int getNearbyNotificationStreamingPolicy(int userId); |
| 146 |
|
| 147 |
void setNearbyAppStreamingPolicy(int policy); |
| 148 |
int getNearbyAppStreamingPolicy(int userId); |
| 149 |
|
| 150 |
void setKeyguardDisabledFeatures(in ComponentName who, int which, boolean parent); |
| 151 |
int getKeyguardDisabledFeatures(in ComponentName who, int userHandle, boolean parent); |
| 152 |
|
| 153 |
void setActiveAdmin(in ComponentName policyReceiver, boolean refreshing, int userHandle); |
| 154 |
boolean isAdminActive(in ComponentName policyReceiver, int userHandle); |
| 155 |
List<ComponentName> getActiveAdmins(int userHandle); |
| 156 |
@UnsupportedAppUsage |
| 157 |
boolean packageHasActiveAdmins(String packageName, int userHandle); |
| 158 |
void getRemoveWarning(in ComponentName policyReceiver, in RemoteCallback result, int userHandle); |
| 159 |
void removeActiveAdmin(in ComponentName policyReceiver, int userHandle); |
| 160 |
void forceRemoveActiveAdmin(in ComponentName policyReceiver, int userHandle); |
| 161 |
boolean hasGrantedPolicy(in ComponentName policyReceiver, int usesPolicy, int userHandle); |
| 162 |
|
| 163 |
void reportPasswordChanged(in PasswordMetrics metrics, int userId); |
| 164 |
void reportFailedPasswordAttempt(int userHandle); |
| 165 |
void reportSuccessfulPasswordAttempt(int userHandle); |
| 166 |
void reportFailedBiometricAttempt(int userHandle); |
| 167 |
void reportSuccessfulBiometricAttempt(int userHandle); |
| 168 |
void reportKeyguardDismissed(int userHandle); |
| 169 |
void reportKeyguardSecured(int userHandle); |
| 170 |
|
| 171 |
boolean setDeviceOwner(in ComponentName who, String ownerName, int userId, boolean setProfileOwnerOnCurrentUserIfNecessary); |
| 172 |
ComponentName getDeviceOwnerComponent(boolean callingUserOnly); |
| 173 |
boolean hasDeviceOwner(); |
| 174 |
String getDeviceOwnerName(); |
| 175 |
void clearDeviceOwner(String packageName); |
| 176 |
int getDeviceOwnerUserId(); |
| 177 |
|
| 178 |
boolean setProfileOwner(in ComponentName who, String ownerName, int userHandle); |
| 179 |
ComponentName getProfileOwnerAsUser(int userHandle); |
| 180 |
ComponentName getProfileOwnerOrDeviceOwnerSupervisionComponent(in UserHandle userHandle); |
| 181 |
boolean isSupervisionComponent(in ComponentName who); |
| 182 |
String getProfileOwnerName(int userHandle); |
| 183 |
void setProfileEnabled(in ComponentName who); |
| 184 |
void setProfileName(in ComponentName who, String profileName); |
| 185 |
void clearProfileOwner(in ComponentName who); |
| 186 |
boolean hasUserSetupCompleted(); |
| 187 |
boolean isOrganizationOwnedDeviceWithManagedProfile(); |
| 188 |
|
| 189 |
boolean checkDeviceIdentifierAccess(in String packageName, int pid, int uid); |
| 190 |
|
| 191 |
void setDeviceOwnerLockScreenInfo(in ComponentName who, CharSequence deviceOwnerInfo); |
| 192 |
CharSequence getDeviceOwnerLockScreenInfo(); |
| 193 |
|
| 194 |
String[] setPackagesSuspended(in ComponentName admin, in String callerPackage, in String[] packageNames, boolean suspended); |
| 195 |
boolean isPackageSuspended(in ComponentName admin, in String callerPackage, String packageName); |
| 196 |
List<String> listPolicyExemptApps(); |
| 197 |
|
| 198 |
boolean installCaCert(in ComponentName admin, String callerPackage, in byte[] certBuffer); |
| 199 |
void uninstallCaCerts(in ComponentName admin, String callerPackage, in String[] aliases); |
| 200 |
void enforceCanManageCaCerts(in ComponentName admin, in String callerPackage); |
| 201 |
boolean approveCaCert(in String alias, int userHandle, boolean approval); |
| 202 |
boolean isCaCertApproved(in String alias, int userHandle); |
| 203 |
|
| 204 |
boolean installKeyPair(in ComponentName who, in String callerPackage, in byte[] privKeyBuffer, |
| 205 |
in byte[] certBuffer, in byte[] certChainBuffer, String alias, boolean requestAccess, |
| 206 |
boolean isUserSelectable); |
| 207 |
boolean removeKeyPair(in ComponentName who, in String callerPackage, String alias); |
| 208 |
boolean hasKeyPair(in String callerPackage, in String alias); |
| 209 |
boolean generateKeyPair(in ComponentName who, in String callerPackage, in String algorithm, |
| 210 |
in ParcelableKeyGenParameterSpec keySpec, |
| 211 |
in int idAttestationFlags, out KeymasterCertificateChain attestationChain); |
| 212 |
boolean setKeyPairCertificate(in ComponentName who, in String callerPackage, in String alias, |
| 213 |
in byte[] certBuffer, in byte[] certChainBuffer, boolean isUserSelectable); |
| 214 |
void choosePrivateKeyAlias(int uid, in Uri uri, in String alias, IBinder aliasCallback); |
| 215 |
|
| 216 |
void setDelegatedScopes(in ComponentName who, in String delegatePackage, in List<String> scopes); |
| 217 |
List<String> getDelegatedScopes(in ComponentName who, String delegatePackage); |
| 218 |
List<String> getDelegatePackages(in ComponentName who, String scope); |
| 219 |
|
| 220 |
void setCertInstallerPackage(in ComponentName who, String installerPackage); |
| 221 |
String getCertInstallerPackage(in ComponentName who); |
| 222 |
|
| 223 |
boolean setAlwaysOnVpnPackage(in ComponentName who, String vpnPackage, boolean lockdown, in List<String> lockdownAllowlist); |
| 224 |
String getAlwaysOnVpnPackage(in ComponentName who); |
| 225 |
String getAlwaysOnVpnPackageForUser(int userHandle); |
| 226 |
boolean isAlwaysOnVpnLockdownEnabled(in ComponentName who); |
| 227 |
boolean isAlwaysOnVpnLockdownEnabledForUser(int userHandle); |
| 228 |
List<String> getAlwaysOnVpnLockdownAllowlist(in ComponentName who); |
| 229 |
|
| 230 |
void addPersistentPreferredActivity(in ComponentName admin, in IntentFilter filter, in ComponentName activity); |
| 231 |
void clearPackagePersistentPreferredActivities(in ComponentName admin, String packageName); |
| 232 |
|
| 233 |
void setDefaultSmsApplication(in ComponentName admin, String packageName, boolean parent); |
| 234 |
|
| 235 |
void setApplicationRestrictions(in ComponentName who, in String callerPackage, in String packageName, in Bundle settings); |
| 236 |
Bundle getApplicationRestrictions(in ComponentName who, in String callerPackage, in String packageName); |
| 237 |
boolean setApplicationRestrictionsManagingPackage(in ComponentName admin, in String packageName); |
| 238 |
String getApplicationRestrictionsManagingPackage(in ComponentName admin); |
| 239 |
boolean isCallerApplicationRestrictionsManagingPackage(in String callerPackage); |
| 240 |
|
| 241 |
void setRestrictionsProvider(in ComponentName who, in ComponentName provider); |
| 242 |
ComponentName getRestrictionsProvider(int userHandle); |
| 243 |
|
| 244 |
void setUserRestriction(in ComponentName who, in String key, boolean enable, boolean parent); |
| 245 |
Bundle getUserRestrictions(in ComponentName who, boolean parent); |
| 246 |
void addCrossProfileIntentFilter(in ComponentName admin, in IntentFilter filter, int flags); |
| 247 |
void clearCrossProfileIntentFilters(in ComponentName admin); |
| 248 |
|
| 249 |
boolean setPermittedAccessibilityServices(in ComponentName admin,in List<String> packageList); |
| 250 |
List<String> getPermittedAccessibilityServices(in ComponentName admin); |
| 251 |
List<String> getPermittedAccessibilityServicesForUser(int userId); |
| 252 |
boolean isAccessibilityServicePermittedByAdmin(in ComponentName admin, String packageName, int userId); |
| 253 |
|
| 254 |
boolean setPermittedInputMethods(in ComponentName admin,in List<String> packageList, boolean parent); |
| 255 |
List<String> getPermittedInputMethods(in ComponentName admin, boolean parent); |
| 256 |
List<String> getPermittedInputMethodsAsUser(int userId); |
| 257 |
boolean isInputMethodPermittedByAdmin(in ComponentName admin, String packageName, int userId, boolean parent); |
| 258 |
|
| 259 |
boolean setPermittedCrossProfileNotificationListeners(in ComponentName admin, in List<String> packageList); |
| 260 |
List<String> getPermittedCrossProfileNotificationListeners(in ComponentName admin); |
| 261 |
boolean isNotificationListenerServicePermitted(in String packageName, int userId); |
| 262 |
|
| 263 |
Intent createAdminSupportIntent(in String restriction); |
| 264 |
Bundle getEnforcingAdminAndUserDetails(int userId,String restriction); |
| 265 |
boolean setApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName, boolean hidden, boolean parent); |
| 266 |
boolean isApplicationHidden(in ComponentName admin, in String callerPackage, in String packageName, boolean parent); |
| 267 |
|
| 268 |
UserHandle createAndManageUser(in ComponentName who, in String name, in ComponentName profileOwner, in PersistableBundle adminExtras, in int flags); |
| 269 |
boolean removeUser(in ComponentName who, in UserHandle userHandle); |
| 270 |
boolean switchUser(in ComponentName who, in UserHandle userHandle); |
| 271 |
int startUserInBackground(in ComponentName who, in UserHandle userHandle); |
| 272 |
int stopUser(in ComponentName who, in UserHandle userHandle); |
| 273 |
int logoutUser(in ComponentName who); |
| 274 |
int logoutUserInternal(); // AIDL doesn't allow overloading name (logoutUser()) |
| 275 |
int getLogoutUserId(); |
| 276 |
List<UserHandle> getSecondaryUsers(in ComponentName who); |
| 277 |
void acknowledgeNewUserDisclaimer(int userId); |
| 278 |
boolean isNewUserDisclaimerAcknowledged(int userId); |
| 279 |
|
| 280 |
void enableSystemApp(in ComponentName admin, in String callerPackage, in String packageName); |
| 281 |
int enableSystemAppWithIntent(in ComponentName admin, in String callerPackage, in Intent intent); |
| 282 |
boolean installExistingPackage(in ComponentName admin, in String callerPackage, in String packageName); |
| 283 |
|
| 284 |
void setAccountManagementDisabled(in ComponentName who, in String accountType, in boolean disabled, in boolean parent); |
| 285 |
String[] getAccountTypesWithManagementDisabled(); |
| 286 |
String[] getAccountTypesWithManagementDisabledAsUser(int userId, in boolean parent); |
| 287 |
|
| 288 |
void setSecondaryLockscreenEnabled(in ComponentName who, boolean enabled); |
| 289 |
boolean isSecondaryLockscreenEnabled(in UserHandle userHandle); |
| 290 |
|
| 291 |
void setPreferentialNetworkServiceConfigs( |
| 292 |
in List<PreferentialNetworkServiceConfig> preferentialNetworkServiceConfigs); |
| 293 |
List<PreferentialNetworkServiceConfig> getPreferentialNetworkServiceConfigs(); |
| 294 |
|
| 295 |
void setLockTaskPackages(in ComponentName who, in String[] packages); |
| 296 |
String[] getLockTaskPackages(in ComponentName who); |
| 297 |
boolean isLockTaskPermitted(in String pkg); |
| 298 |
|
| 299 |
void setLockTaskFeatures(in ComponentName who, int flags); |
| 300 |
int getLockTaskFeatures(in ComponentName who); |
| 301 |
|
| 302 |
void setGlobalSetting(in ComponentName who, in String setting, in String value); |
| 303 |
void setSystemSetting(in ComponentName who, in String setting, in String value); |
| 304 |
void setSecureSetting(in ComponentName who, in String setting, in String value); |
| 305 |
|
| 306 |
void setConfiguredNetworksLockdownState(in ComponentName who, boolean lockdown); |
| 307 |
boolean hasLockdownAdminConfiguredNetworks(in ComponentName who); |
| 308 |
|
| 309 |
void setLocationEnabled(in ComponentName who, boolean locationEnabled); |
| 310 |
|
| 311 |
boolean setTime(in ComponentName who, long millis); |
| 312 |
boolean setTimeZone(in ComponentName who, String timeZone); |
| 313 |
|
| 314 |
void setMasterVolumeMuted(in ComponentName admin, boolean on); |
| 315 |
boolean isMasterVolumeMuted(in ComponentName admin); |
| 316 |
|
| 317 |
void notifyLockTaskModeChanged(boolean isEnabled, String pkg, int userId); |
| 318 |
|
| 319 |
void setUninstallBlocked(in ComponentName admin, in String callerPackage, in String packageName, boolean uninstallBlocked); |
| 320 |
boolean isUninstallBlocked(in ComponentName admin, in String packageName); |
| 321 |
|
| 322 |
void setCrossProfileCallerIdDisabled(in ComponentName who, boolean disabled); |
| 323 |
boolean getCrossProfileCallerIdDisabled(in ComponentName who); |
| 324 |
boolean getCrossProfileCallerIdDisabledForUser(int userId); |
| 325 |
void setCrossProfileContactsSearchDisabled(in ComponentName who, boolean disabled); |
| 326 |
boolean getCrossProfileContactsSearchDisabled(in ComponentName who); |
| 327 |
boolean getCrossProfileContactsSearchDisabledForUser(int userId); |
| 328 |
void startManagedQuickContact(String lookupKey, long contactId, boolean isContactIdIgnored, long directoryId, in Intent originalIntent); |
| 329 |
|
| 330 |
void setBluetoothContactSharingDisabled(in ComponentName who, boolean disabled); |
| 331 |
boolean getBluetoothContactSharingDisabled(in ComponentName who); |
| 332 |
boolean getBluetoothContactSharingDisabledForUser(int userId); |
| 333 |
|
| 334 |
void setTrustAgentConfiguration(in ComponentName admin, in ComponentName agent, |
| 335 |
in PersistableBundle args, boolean parent); |
| 336 |
List<PersistableBundle> getTrustAgentConfiguration(in ComponentName admin, |
| 337 |
in ComponentName agent, int userId, boolean parent); |
| 338 |
|
| 339 |
boolean addCrossProfileWidgetProvider(in ComponentName admin, String packageName); |
| 340 |
boolean removeCrossProfileWidgetProvider(in ComponentName admin, String packageName); |
| 341 |
List<String> getCrossProfileWidgetProviders(in ComponentName admin); |
| 342 |
|
| 343 |
void setAutoTimeRequired(in ComponentName who, boolean required); |
| 344 |
boolean getAutoTimeRequired(); |
| 345 |
|
| 346 |
void setAutoTimeEnabled(in ComponentName who, boolean enabled); |
| 347 |
boolean getAutoTimeEnabled(in ComponentName who); |
| 348 |
|
| 349 |
void setAutoTimeZoneEnabled(in ComponentName who, boolean enabled); |
| 350 |
boolean getAutoTimeZoneEnabled(in ComponentName who); |
| 351 |
|
| 352 |
void setForceEphemeralUsers(in ComponentName who, boolean forceEpehemeralUsers); |
| 353 |
boolean getForceEphemeralUsers(in ComponentName who); |
| 354 |
|
| 355 |
boolean isRemovingAdmin(in ComponentName adminReceiver, int userHandle); |
| 356 |
|
| 357 |
void setUserIcon(in ComponentName admin, in Bitmap icon); |
| 358 |
|
| 359 |
void setSystemUpdatePolicy(in ComponentName who, in SystemUpdatePolicy policy); |
| 360 |
SystemUpdatePolicy getSystemUpdatePolicy(); |
| 361 |
void clearSystemUpdatePolicyFreezePeriodRecord(); |
| 362 |
|
| 363 |
boolean setKeyguardDisabled(in ComponentName admin, boolean disabled); |
| 364 |
boolean setStatusBarDisabled(in ComponentName who, boolean disabled); |
| 365 |
boolean getDoNotAskCredentialsOnBoot(); |
| 366 |
|
| 367 |
void notifyPendingSystemUpdate(in SystemUpdateInfo info); |
| 368 |
SystemUpdateInfo getPendingSystemUpdate(in ComponentName admin); |
| 369 |
|
| 370 |
void setPermissionPolicy(in ComponentName admin, in String callerPackage, int policy); |
| 371 |
int getPermissionPolicy(in ComponentName admin); |
| 372 |
void setPermissionGrantState(in ComponentName admin, in String callerPackage, String packageName, |
| 373 |
String permission, int grantState, in RemoteCallback resultReceiver); |
| 374 |
int getPermissionGrantState(in ComponentName admin, in String callerPackage, String packageName, String permission); |
| 375 |
boolean isProvisioningAllowed(String action, String packageName); |
| 376 |
int checkProvisioningPrecondition(String action, String packageName); |
| 377 |
void setKeepUninstalledPackages(in ComponentName admin, in String callerPackage, in List<String> packageList); |
| 378 |
List<String> getKeepUninstalledPackages(in ComponentName admin, in String callerPackage); |
| 379 |
boolean isManagedProfile(in ComponentName admin); |
| 380 |
String getWifiMacAddress(in ComponentName admin); |
| 381 |
void reboot(in ComponentName admin); |
| 382 |
|
| 383 |
void setShortSupportMessage(in ComponentName admin, in CharSequence message); |
| 384 |
CharSequence getShortSupportMessage(in ComponentName admin); |
| 385 |
void setLongSupportMessage(in ComponentName admin, in CharSequence message); |
| 386 |
CharSequence getLongSupportMessage(in ComponentName admin); |
| 387 |
|
| 388 |
CharSequence getShortSupportMessageForUser(in ComponentName admin, int userHandle); |
| 389 |
CharSequence getLongSupportMessageForUser(in ComponentName admin, int userHandle); |
| 390 |
|
| 391 |
void setOrganizationColor(in ComponentName admin, in int color); |
| 392 |
void setOrganizationColorForUser(in int color, in int userId); |
| 393 |
void clearOrganizationIdForUser(int userHandle); |
| 394 |
int getOrganizationColor(in ComponentName admin); |
| 395 |
int getOrganizationColorForUser(int userHandle); |
| 396 |
|
| 397 |
void setOrganizationName(in ComponentName admin, in CharSequence title); |
| 398 |
CharSequence getOrganizationName(in ComponentName admin); |
| 399 |
CharSequence getDeviceOwnerOrganizationName(); |
| 400 |
CharSequence getOrganizationNameForUser(int userHandle); |
| 401 |
|
| 402 |
int getUserProvisioningState(); |
| 403 |
void setUserProvisioningState(int state, int userHandle); |
| 404 |
|
| 405 |
void setAffiliationIds(in ComponentName admin, in List<String> ids); |
| 406 |
List<String> getAffiliationIds(in ComponentName admin); |
| 407 |
boolean isCallingUserAffiliated(); |
| 408 |
boolean isAffiliatedUser(int userId); |
| 409 |
|
| 410 |
void setSecurityLoggingEnabled(in ComponentName admin, String packageName, boolean enabled); |
| 411 |
boolean isSecurityLoggingEnabled(in ComponentName admin, String packageName); |
| 412 |
ParceledListSlice retrieveSecurityLogs(in ComponentName admin, String packageName); |
| 413 |
ParceledListSlice retrievePreRebootSecurityLogs(in ComponentName admin, String packageName); |
| 414 |
long forceNetworkLogs(); |
| 415 |
long forceSecurityLogs(); |
| 416 |
|
| 417 |
boolean isUninstallInQueue(String packageName); |
| 418 |
void uninstallPackageWithActiveAdmins(String packageName); |
| 419 |
|
| 420 |
boolean isDeviceProvisioned(); |
| 421 |
boolean isDeviceProvisioningConfigApplied(); |
| 422 |
void setDeviceProvisioningConfigApplied(); |
| 423 |
|
| 424 |
void forceUpdateUserSetupComplete(int userId); |
| 425 |
|
| 426 |
void setBackupServiceEnabled(in ComponentName admin, boolean enabled); |
| 427 |
boolean isBackupServiceEnabled(in ComponentName admin); |
| 428 |
|
| 429 |
void setNetworkLoggingEnabled(in ComponentName admin, in String packageName, boolean enabled); |
| 430 |
boolean isNetworkLoggingEnabled(in ComponentName admin, in String packageName); |
| 431 |
List<NetworkEvent> retrieveNetworkLogs(in ComponentName admin, in String packageName, long batchToken); |
| 432 |
|
| 433 |
boolean bindDeviceAdminServiceAsUser(in ComponentName admin, |
| 434 |
IApplicationThread caller, IBinder token, in Intent service, |
| 435 |
IServiceConnection connection, int flags, int targetUserId); |
| 436 |
List<UserHandle> getBindDeviceAdminTargetUsers(in ComponentName admin); |
| 437 |
boolean isEphemeralUser(in ComponentName admin); |
| 438 |
|
| 439 |
long getLastSecurityLogRetrievalTime(); |
| 440 |
long getLastBugReportRequestTime(); |
| 441 |
long getLastNetworkLogRetrievalTime(); |
| 442 |
|
| 443 |
boolean setResetPasswordToken(in ComponentName admin, in byte[] token); |
| 444 |
boolean clearResetPasswordToken(in ComponentName admin); |
| 445 |
boolean isResetPasswordTokenActive(in ComponentName admin); |
| 446 |
boolean resetPasswordWithToken(in ComponentName admin, String password, in byte[] token, int flags); |
| 447 |
|
| 448 |
boolean isCurrentInputMethodSetByOwner(); |
| 449 |
StringParceledListSlice getOwnerInstalledCaCerts(in UserHandle user); |
| 450 |
|
| 451 |
void clearApplicationUserData(in ComponentName admin, in String packageName, in IPackageDataObserver callback); |
| 452 |
|
| 453 |
void setLogoutEnabled(in ComponentName admin, boolean enabled); |
| 454 |
boolean isLogoutEnabled(); |
| 455 |
|
| 456 |
List<String> getDisallowedSystemApps(in ComponentName admin, int userId, String provisioningAction); |
| 457 |
|
| 458 |
void transferOwnership(in ComponentName admin, in ComponentName target, in PersistableBundle bundle); |
| 459 |
PersistableBundle getTransferOwnershipBundle(); |
| 460 |
|
| 461 |
void setStartUserSessionMessage(in ComponentName admin, in CharSequence startUserSessionMessage); |
| 462 |
void setEndUserSessionMessage(in ComponentName admin, in CharSequence endUserSessionMessage); |
| 463 |
CharSequence getStartUserSessionMessage(in ComponentName admin); |
| 464 |
CharSequence getEndUserSessionMessage(in ComponentName admin); |
| 465 |
|
| 466 |
List<String> setMeteredDataDisabledPackages(in ComponentName admin, in List<String> packageNames); |
| 467 |
List<String> getMeteredDataDisabledPackages(in ComponentName admin); |
| 468 |
|
| 469 |
int addOverrideApn(in ComponentName admin, in ApnSetting apnSetting); |
| 470 |
boolean updateOverrideApn(in ComponentName admin, int apnId, in ApnSetting apnSetting); |
| 471 |
boolean removeOverrideApn(in ComponentName admin, int apnId); |
| 472 |
List<ApnSetting> getOverrideApns(in ComponentName admin); |
| 473 |
void setOverrideApnsEnabled(in ComponentName admin, boolean enabled); |
| 474 |
boolean isOverrideApnEnabled(in ComponentName admin); |
| 475 |
|
| 476 |
boolean isMeteredDataDisabledPackageForUser(in ComponentName admin, String packageName, int userId); |
| 477 |
|
| 478 |
int setGlobalPrivateDns(in ComponentName admin, int mode, in String privateDnsHost); |
| 479 |
int getGlobalPrivateDnsMode(in ComponentName admin); |
| 480 |
String getGlobalPrivateDnsHost(in ComponentName admin); |
| 481 |
|
| 482 |
void setProfileOwnerOnOrganizationOwnedDevice(in ComponentName who, int userId, boolean isProfileOwnerOnOrganizationOwnedDevice); |
| 483 |
|
| 484 |
void installUpdateFromFile(in ComponentName admin, in ParcelFileDescriptor updateFileDescriptor, in StartInstallingUpdateCallback listener); |
| 485 |
|
| 486 |
void setCrossProfileCalendarPackages(in ComponentName admin, in List<String> packageNames); |
| 487 |
List<String> getCrossProfileCalendarPackages(in ComponentName admin); |
| 488 |
boolean isPackageAllowedToAccessCalendarForUser(String packageName, int userHandle); |
| 489 |
List<String> getCrossProfileCalendarPackagesForUser(int userHandle); |
| 490 |
|
| 491 |
void setCrossProfilePackages(in ComponentName admin, in List<String> packageNames); |
| 492 |
List<String> getCrossProfilePackages(in ComponentName admin); |
| 493 |
|
| 494 |
List<String> getAllCrossProfilePackages(); |
| 495 |
List<String> getDefaultCrossProfilePackages(); |
| 496 |
|
| 497 |
boolean isManagedKiosk(); |
| 498 |
boolean isUnattendedManagedKiosk(); |
| 499 |
|
| 500 |
boolean startViewCalendarEventInManagedProfile(String packageName, long eventId, long start, long end, boolean allDay, int flags); |
| 501 |
|
| 502 |
boolean setKeyGrantForApp(in ComponentName admin, String callerPackage, String alias, String packageName, boolean hasGrant); |
| 503 |
ParcelableGranteeMap getKeyPairGrants(in String callerPackage, in String alias); |
| 504 |
boolean setKeyGrantToWifiAuth(String callerPackage, String alias, boolean hasGrant); |
| 505 |
boolean isKeyPairGrantedToWifiAuth(String callerPackage, String alias); |
| 506 |
|
| 507 |
void setUserControlDisabledPackages(in ComponentName admin, in List<String> packages); |
| 508 |
|
| 509 |
List<String> getUserControlDisabledPackages(in ComponentName admin); |
| 510 |
|
| 511 |
void setCommonCriteriaModeEnabled(in ComponentName admin, boolean enabled); |
| 512 |
boolean isCommonCriteriaModeEnabled(in ComponentName admin); |
| 513 |
|
| 514 |
int getPersonalAppsSuspendedReasons(in ComponentName admin); |
| 515 |
void setPersonalAppsSuspended(in ComponentName admin, boolean suspended); |
| 516 |
|
| 517 |
long getManagedProfileMaximumTimeOff(in ComponentName admin); |
| 518 |
void setManagedProfileMaximumTimeOff(in ComponentName admin, long timeoutMs); |
| 519 |
|
| 520 |
void acknowledgeDeviceCompliant(); |
| 521 |
boolean isComplianceAcknowledgementRequired(); |
| 522 |
|
| 523 |
boolean canProfileOwnerResetPasswordWhenLocked(int userId); |
| 524 |
|
| 525 |
void setNextOperationSafety(int operation, int reason); |
| 526 |
boolean isSafeOperation(int reason); |
| 527 |
|
| 528 |
String getEnrollmentSpecificId(String callerPackage); |
| 529 |
void setOrganizationIdForUser(in String callerPackage, in String enterpriseId, int userId); |
| 530 |
|
| 531 |
UserHandle createAndProvisionManagedProfile(in ManagedProfileProvisioningParams provisioningParams, in String callerPackage); |
| 532 |
void provisionFullyManagedDevice(in FullyManagedDeviceProvisioningParams provisioningParams, in String callerPackage); |
| 533 |
|
| 534 |
void finalizeWorkProfileProvisioning(in UserHandle managedProfileUser, in Account migratedAccount); |
| 535 |
|
| 536 |
void setDeviceOwnerType(in ComponentName admin, in int deviceOwnerType); |
| 537 |
int getDeviceOwnerType(in ComponentName admin); |
| 538 |
|
| 539 |
void resetDefaultCrossProfileIntentFilters(int userId); |
| 540 |
boolean canAdminGrantSensorsPermissionsForUser(int userId); |
| 541 |
|
| 542 |
void setUsbDataSignalingEnabled(String callerPackage, boolean enabled); |
| 543 |
boolean isUsbDataSignalingEnabled(String callerPackage); |
| 544 |
boolean isUsbDataSignalingEnabledForUser(int userId); |
| 545 |
boolean canUsbDataSignalingBeDisabled(); |
| 546 |
|
| 547 |
void setMinimumRequiredWifiSecurityLevel(int level); |
| 548 |
int getMinimumRequiredWifiSecurityLevel(); |
| 549 |
|
| 550 |
void setWifiSsidPolicy(in WifiSsidPolicy policy); |
| 551 |
WifiSsidPolicy getWifiSsidPolicy(); |
| 552 |
|
| 553 |
List<UserHandle> listForegroundAffiliatedUsers(); |
| 554 |
void setDrawables(in List<DevicePolicyDrawableResource> drawables); |
| 555 |
void resetDrawables(in List<String> drawableIds); |
| 556 |
ParcelableResource getDrawable(String drawableId, String drawableStyle, String drawableSource); |
| 557 |
|
| 558 |
boolean isDpcDownloaded(); |
| 559 |
void setDpcDownloaded(boolean downloaded); |
| 560 |
|
| 561 |
void setStrings(in List<DevicePolicyStringResource> strings); |
| 562 |
void resetStrings(in List<String> stringIds); |
| 563 |
ParcelableResource getString(String stringId); |
| 564 |
|
| 565 |
boolean shouldAllowBypassingDevicePolicyManagementRoleQualification(); |
| 566 |
|
| 567 |
List<UserHandle> getPolicyManagedProfiles(in UserHandle userHandle); |
| 568 |
} |