diff options
| author | 2017-01-20 17:12:18 +0000 | |
|---|---|---|
| committer | 2017-01-20 17:12:21 +0000 | |
| commit | 61238c2d13c81033698fd78b29c38c124d3740ea (patch) | |
| tree | 3ea55b060a1ae85973dbd9955fe45d07f4de8669 | |
| parent | 444d64749df82407382184f580c4bd6518af4fd6 (diff) | |
| parent | b71fedc494189538b7219919ba1c831f9c6c91f9 (diff) | |
Merge "Unhide enabling backup service in DO APIs"
| -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 107a2924534c..c2645219f151 100644 --- a/api/current.txt +++ b/api/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 isDeviceOwnerApp(java.lang.String); method public boolean isLockTaskPermitted(java.lang.String); @@ -6179,6 +6180,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 fa284a6cf420..9bc72dbf1570 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -6352,6 +6352,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); @@ -6387,6 +6388,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 499fd3c238a4..e672ededc2f3 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -6170,6 +6170,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); @@ -6201,6 +6202,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 2701698e531b..e26a2567eb1d 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -7137,15 +7137,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 { @@ -7156,8 +7155,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 { |