Merge "Unhide enabling backup service in DO APIs"
This commit is contained in:
committed by
Android (Google) Code Review
commit
61238c2d13
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>There must be only one user on the device, managed by the device owner.
|
||||
* Otherwise a {@link SecurityException} will be thrown.
|
||||
* <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>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 {
|
||||
|
||||
Reference in New Issue
Block a user