diff options
| author | 2017-01-05 15:21:38 +0000 | |
|---|---|---|
| committer | 2017-01-19 17:49:51 +0000 | |
| commit | b71fedc494189538b7219919ba1c831f9c6c91f9 (patch) | |
| tree | 60ece527512d84c5385b8add24a5a4bd6c2ef54d | |
| parent | 606c2a23c9768c45b427b51630f639f7d2a36961 (diff) | |
Unhide enabling backup service in DO APIs
Bug: 28628532
Change-Id: I5940735994c7e63fae86549fedcf138ad12151cd
| -rw-r--r-- | api/current.txt | 2 | ||||
| -rw-r--r-- | api/system-current.txt | 2 | ||||
| -rw-r--r-- | api/test-current.txt | 2 | ||||
| -rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 19 |
4 files changed, 17 insertions, 8 deletions
diff --git a/api/current.txt b/api/current.txt index 6da09e35fe5e..eb1c68243a60 100644 --- a/api/current.txt +++ b/api/current.txt @@ -6128,6 +6128,7 @@ package android.app.admin { method public boolean isActivePasswordSufficient(); method public boolean isAdminActive(android.content.ComponentName); method public boolean isApplicationHidden(android.content.ComponentName, java.lang.String); + method public boolean isBackupServiceEnabled(android.content.ComponentName); method public boolean isCallerApplicationRestrictionsManagingPackage(); method public boolean isDeviceOwnerApp(java.lang.String); method public boolean isLockTaskPermitted(java.lang.String); @@ -6158,6 +6159,7 @@ package android.app.admin { method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle); method public void setApplicationRestrictionsManagingPackage(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException; method public void setAutoTimeRequired(android.content.ComponentName, boolean); + method public void setBackupServiceEnabled(android.content.ComponentName, boolean); method public void setBluetoothContactSharingDisabled(android.content.ComponentName, boolean); method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCertInstallerPackage(android.content.ComponentName, java.lang.String) throws java.lang.SecurityException; diff --git a/api/system-current.txt b/api/system-current.txt index 5640eafcee1f..a7d8b9d22259 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -6318,6 +6318,7 @@ package android.app.admin { method public boolean isActivePasswordSufficient(); method public boolean isAdminActive(android.content.ComponentName); method public boolean isApplicationHidden(android.content.ComponentName, java.lang.String); + method public boolean isBackupServiceEnabled(android.content.ComponentName); method public boolean isCallerApplicationRestrictionsManagingPackage(); method public boolean isDeviceManaged(); method public boolean isDeviceOwnerApp(java.lang.String); @@ -6353,6 +6354,7 @@ package android.app.admin { method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle); method public void setApplicationRestrictionsManagingPackage(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException; method public void setAutoTimeRequired(android.content.ComponentName, boolean); + method public void setBackupServiceEnabled(android.content.ComponentName, boolean); method public void setBluetoothContactSharingDisabled(android.content.ComponentName, boolean); method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCertInstallerPackage(android.content.ComponentName, java.lang.String) throws java.lang.SecurityException; diff --git a/api/test-current.txt b/api/test-current.txt index 714cac9fc559..6f79c47be8b9 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -6149,6 +6149,7 @@ package android.app.admin { method public boolean isActivePasswordSufficient(); method public boolean isAdminActive(android.content.ComponentName); method public boolean isApplicationHidden(android.content.ComponentName, java.lang.String); + method public boolean isBackupServiceEnabled(android.content.ComponentName); method public boolean isCallerApplicationRestrictionsManagingPackage(); method public boolean isDeviceManaged(); method public boolean isDeviceOwnerApp(java.lang.String); @@ -6180,6 +6181,7 @@ package android.app.admin { method public void setApplicationRestrictions(android.content.ComponentName, java.lang.String, android.os.Bundle); method public void setApplicationRestrictionsManagingPackage(android.content.ComponentName, java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException; method public void setAutoTimeRequired(android.content.ComponentName, boolean); + method public void setBackupServiceEnabled(android.content.ComponentName, boolean); method public void setBluetoothContactSharingDisabled(android.content.ComponentName, boolean); method public void setCameraDisabled(android.content.ComponentName, boolean); method public void setCertInstallerPackage(android.content.ComponentName, java.lang.String) throws java.lang.SecurityException; diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index c95e0113e801..c8ef47cf57f7 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -7122,15 +7122,14 @@ public class DevicePolicyManager { } /** - * @hide - * Enable backup service. - * <p>This includes all backup and restore mechanisms. - * Setting this to {@code false} will make backup service no-op or return empty results. + * Allows the device owner to enable or disable the backup service. + * + * <p> Backup service manages all backup and restore mechanisms on the device. Setting this to + * false will prevent data from being backed up or restored. * - * <p>There must be only one user on the device, managed by the device owner. - * Otherwise a {@link SecurityException} will be thrown. + * <p> Backup service is off by default when device owner is present. * - * <p>Backup service is off by default when device owner is present. + * @throws SecurityException if {@code admin} is not a device owner. */ public void setBackupServiceEnabled(@NonNull ComponentName admin, boolean enabled) { try { @@ -7141,8 +7140,12 @@ public class DevicePolicyManager { } /** - * @hide + * Return whether the backup service is enabled by the device owner. + * + * <p> Backup service manages all backup and restore mechanisms on the device. + * * @return {@code true} if backup service is enabled, {@code false} otherwise. + * @see #setBackupServiceEnabled */ public boolean isBackupServiceEnabled(@NonNull ComponentName admin) { try { |