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

Commit 880b41cb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove BatteryStats ref from BackupRecord"

parents 800b60fb fc099277
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -15466,12 +15466,6 @@ public class ActivityManagerService extends IActivityManager.Stub
        synchronized(this) {
            // !!! TODO: currently no check here that we're already bound
            BatteryStatsImpl.Uid.Pkg.Serv ss = null;
            BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics();
            synchronized (stats) {
                ss = stats.getServiceStatsLocked(app.uid, app.packageName, app.name);
            }
            // Backup agent is now in use, its package can't be stopped.
            try {
                AppGlobals.getPackageManager().setPackageStoppedState(
@@ -15482,7 +15476,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                        + app.packageName + ": " + e);
            }
            BackupRecord r = new BackupRecord(ss, app, backupMode);
            BackupRecord r = new BackupRecord(app, backupMode);
            ComponentName hostingName =
                    (backupMode == ApplicationThreadConstants.BACKUP_MODE_INCREMENTAL)
                            ? new ComponentName(app.packageName, app.backupAgentName)
+1 −6
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package com.android.server.am;

import com.android.internal.os.BatteryStatsImpl;

import android.content.pm.ApplicationInfo;

/** @hide */
@@ -28,7 +26,6 @@ final class BackupRecord {
    public static final int RESTORE = 2;
    public static final int RESTORE_FULL = 3;
    
    final BatteryStatsImpl.Uid.Pkg.Serv stats;
    String stringName;                     // cached toString() output
    final ApplicationInfo appInfo;         // information about BackupAgent's app
    final int backupMode;                  // full backup / incremental / restore
@@ -36,9 +33,7 @@ final class BackupRecord {

    // ----- Implementation -----

    BackupRecord(BatteryStatsImpl.Uid.Pkg.Serv _agentStats, ApplicationInfo _appInfo,
            int _backupMode) {
        stats = _agentStats;
    BackupRecord(ApplicationInfo _appInfo, int _backupMode) {
        appInfo = _appInfo;
        backupMode = _backupMode;
    }