diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 4e0e4b9d1ec79..af5c5bfdba1df 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -1522,6 +1522,7 @@ package android.app.backup { method @RequiresPermission(android.Manifest.permission.BACKUP) public void setAncestralSerialNumber(long); method @RequiresPermission(android.Manifest.permission.BACKUP) public void setAutoRestore(boolean); method @RequiresPermission(android.Manifest.permission.BACKUP) public void setBackupEnabled(boolean); + method @RequiresPermission(allOf={android.Manifest.permission.BACKUP, android.Manifest.permission.INTERACT_ACROSS_USERS_FULL}, conditional=true) public void setFrameworkSchedulingEnabled(boolean); method @Deprecated @RequiresPermission(android.Manifest.permission.BACKUP) public void updateTransportAttributes(@NonNull android.content.ComponentName, @NonNull String, @Nullable android.content.Intent, @NonNull String, @Nullable android.content.Intent, @Nullable String); method @RequiresPermission(android.Manifest.permission.BACKUP) public void updateTransportAttributes(@NonNull android.content.ComponentName, @NonNull String, @Nullable android.content.Intent, @NonNull String, @Nullable android.content.Intent, @Nullable CharSequence); field public static final int ERROR_AGENT_FAILURE = -1003; // 0xfffffc15 diff --git a/core/java/android/app/backup/BackupManager.java b/core/java/android/app/backup/BackupManager.java index ddeb2f936c7af..e750f498248af 100644 --- a/core/java/android/app/backup/BackupManager.java +++ b/core/java/android/app/backup/BackupManager.java @@ -407,16 +407,19 @@ public class BackupManager { } /** - * Enable/disable the framework backup scheduling entirely for the current user. When disabled, + * Enable/disable the framework backup scheduling entirely for the context user. When disabled, * no Key/Value or Full backup jobs will be scheduled by the Android framework. * *

Note: This does not disable backups: only their scheduling is affected and backups can * still be triggered manually. * - *

Callers must hold the android.permission.BACKUP permission to use this method. + *

Callers must hold the android.permission.BACKUP permission to use this method. If the + * context user is different from the calling user, then the caller must additionally hold the + * android.permission.INTERACT_ACROSS_USERS_FULL permission. * * @hide */ + @SystemApi @RequiresPermission(allOf = {android.Manifest.permission.BACKUP, android.Manifest.permission.INTERACT_ACROSS_USERS_FULL}, conditional = true) public void setFrameworkSchedulingEnabled(boolean isEnabled) {