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

Commit 144788b5 authored by Jeffrey Huang's avatar Jeffrey Huang Committed by Android (Google) Code Review
Browse files

Merge "Update process_state_changed logging" into rvc-dev

parents 4a06a170 41919763
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4009,6 +4009,11 @@ public class BatteryStatsImpl extends BatteryStats {
            // Otherwise the parent's process state will get downgraded incorrectly
            return;
        }
        // TODO(b/155216561): It is possible for isolated uids to be in a higher
        // state than its parent uid. We should track the highest state within the union of host
        // and isolated uids rather than only the parent uid.
        FrameworkStatsLog.write(FrameworkStatsLog.UID_PROCESS_STATE_CHANGED, uid,
                ActivityManager.processStateAmToProto(state));
        getUidStatsLocked(uid).updateUidProcessStateLocked(state);
    }
+0 −4
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.server.am;

import android.app.ActivityManager;
import android.bluetooth.BluetoothActivityEnergyInfo;
import android.content.ContentResolver;
import android.content.Context;
@@ -376,9 +375,6 @@ public final class BatteryStatsService extends IBatteryStats.Stub
    /** @param state Process state from ActivityManager.java. */
    void noteUidProcessState(int uid, int state) {
        synchronized (mStats) {
            FrameworkStatsLog.write(FrameworkStatsLog.UID_PROCESS_STATE_CHANGED, uid,
                    ActivityManager.processStateAmToProto(state));

            mStats.noteUidProcessStateLocked(uid, state);
        }
    }