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

Commit 8edc3330 authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/lineage-21.0' into v1-u

parents ce55d5df 5265fbf0
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -319,14 +319,7 @@ public class BackupManagerService extends IBackupManager.Stub {
    /**
     * If there is a "suppress" file for the system user, backup is inactive for ALL users.
     *
     * Otherwise, the below logic applies:
     *
     * For the {@link #mDefaultBackupUserId}, backup is active by default. Backup is only
     * deactivated if there exists a "suppress" file for the user, which can be created by calling
     * {@link #setBackupServiceActive}.
     *
     * For non-main users, backup is only active if there exists an "activated" file for the user,
     * which can also be created by calling {@link #setBackupServiceActive}.
     * Otherwise, it is activated for all users.
     */
    private boolean isBackupActivatedForUser(int userId) {
        if (getSuppressFileForUser(UserHandle.USER_SYSTEM).exists()) {
@@ -341,11 +334,7 @@ public class BackupManagerService extends IBackupManager.Stub {
            return false;
        }

        if (isDefaultUser && getSuppressFileForUser(userId).exists()) {
            return false;
        }

        return isDefaultUser || getActivatedFileForUser(userId).exists();
        return true;
    }

    @VisibleForTesting