Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6e4ce08 authored by Andrea Zilio's avatar Andrea Zilio Committed by Android (Google) Code Review
Browse files

Merge "- Enable Android API to allow disabling of framework backup scheduling"

parents 1090a231 095406a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+5 −2
Original line number Diff line number Diff line
@@ -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.
     *
     * <p>Note: This does not disable backups: only their scheduling is affected and backups can
     * still be triggered manually.
     *
     * <p>Callers must hold the android.permission.BACKUP permission to use this method.
     * <p>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) {