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

Commit ffe2abed authored by Artem Iglikov's avatar Artem Iglikov Committed by Android (Google) Code Review
Browse files

Merge "Move inner classes of RefactoredBackupManagerService to their own files."

parents 8b9f1f67 f251e350
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ package com.android.server.backup;
/**
 * Interface and methods used by the asynchronous-with-timeout backup/restore operations.
 */
interface BackupRestoreTask {
public interface BackupRestoreTask {

    // Execute one tick of whatever state machine the task implements
    void execute();
+9 −9
Original line number Diff line number Diff line
@@ -19,15 +19,15 @@ package com.android.server.backup;
/**
 * Description of a file in the restore datastream.
 */
class FileMetadata {
    String packageName;             // name of the owning app
    String installerPackageName;    // name of the market-type app that installed the owner
    int type;                       // e.g. BackupAgent.TYPE_DIRECTORY
    String domain;                  // e.g. FullBackup.DATABASE_TREE_TOKEN
    String path;                    // subpath within the semantic domain
    long mode;                      // e.g. 0666 (actually int)
    long mtime;                     // last mod time, UTC time_t (actually int)
    long size;                      // bytes of content
public class FileMetadata {
    public String packageName;             // name of the owning app
    public String installerPackageName;    // name of the market-type app that installed the owner
    public int type;                       // e.g. BackupAgent.TYPE_DIRECTORY
    public String domain;                  // e.g. FullBackup.DATABASE_TREE_TOKEN
    public String path;                    // subpath within the semantic domain
    public long mode;                      // e.g. 0666 (actually int)
    public long mtime;                     // last mod time, UTC time_t (actually int)
    public long size;                      // bytes of content

    @Override
    public String toString() {
+4 −4
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import java.io.OutputStream;
 * TODO: We should create unified backup/restore engines that can be used for both transport and
 * adb backup/restore, and for fullbackup and key-value backup.
 */
class KeyValueAdbBackupEngine {
public class KeyValueAdbBackupEngine {
    private static final String TAG = "KeyValueAdbBackupEngine";
    private static final boolean DEBUG = false;

@@ -58,7 +58,7 @@ class KeyValueAdbBackupEngine {
    private ParcelFileDescriptor mBackupData;
    private ParcelFileDescriptor mNewState;

    KeyValueAdbBackupEngine(OutputStream output, PackageInfo packageInfo,
    public KeyValueAdbBackupEngine(OutputStream output, PackageInfo packageInfo,
            BackupManagerServiceInterface backupManagerService, PackageManager packageManager,
            File baseStateDir, File dataDir) {
        mOutput = output;
@@ -81,7 +81,7 @@ class KeyValueAdbBackupEngine {
        mManifestFile = new File(mDataDir, BackupManagerService.BACKUP_MANIFEST_FILENAME);
    }

    void backupOnePackage() throws IOException {
    public void backupOnePackage() throws IOException {
        ApplicationInfo targetApp = mCurrentPackage.applicationInfo;

        try {
+4 −3
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ import java.util.Map;
 * TODO: We should create unified backup/restore engines that can be used for both transport and
 * adb backup/restore, and for fullbackup and key-value backup.
 */
class KeyValueAdbRestoreEngine implements Runnable {
public class KeyValueAdbRestoreEngine implements Runnable {
    private static final String TAG = "KeyValueAdbRestoreEngine";
    private static final boolean DEBUG = false;

@@ -46,8 +46,9 @@ class KeyValueAdbRestoreEngine implements Runnable {
    IBackupAgent mAgent;
    int mToken;

    KeyValueAdbRestoreEngine(BackupManagerServiceInterface backupManagerService, File dataDir,
            FileMetadata info, ParcelFileDescriptor inFD, IBackupAgent agent, int token) {
    public KeyValueAdbRestoreEngine(BackupManagerServiceInterface backupManagerService,
            File dataDir, FileMetadata info, ParcelFileDescriptor inFD, IBackupAgent agent,
            int token) {
        mBackupManagerService = backupManagerService;
        mDataDir = dataDir;
        mInfo = info;
+2 −2
Original line number Diff line number Diff line
@@ -108,11 +108,11 @@ public class PackageManagerBackupAgent extends BackupAgent {

    // We're constructed with the set of applications that are participating
    // in backup.  This set changes as apps are installed & removed.
    PackageManagerBackupAgent(PackageManager packageMgr, List<PackageInfo> packages) {
    public PackageManagerBackupAgent(PackageManager packageMgr, List<PackageInfo> packages) {
        init(packageMgr, packages);
    }

    PackageManagerBackupAgent(PackageManager packageMgr) {
    public PackageManagerBackupAgent(PackageManager packageMgr) {
        init(packageMgr, null);

        evaluateStorablePackages();
Loading