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

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

Merge "Add missing key for temporary battery process event and missing tag id...

Merge "Add missing key for temporary battery process event and missing tag id for process Test: tested locally"
parents a5c807ae e03583e2
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -24,7 +24,8 @@ option java_outer_classname = "StatsConstantsProto";


enum TagId {
enum TagId {
  WAKELOCK = 1;
  WAKELOCK = 1;
  SCREEN = 1003;
  SCREEN = 2;
  PROCESS = 1112; // TODO: Temporary usage only for testing.
}
}


enum KeyId {
enum KeyId {
+11 −11
Original line number Original line Diff line number Diff line
@@ -300,10 +300,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub


            // TODO: remove this once we figure out properly where and how
            // TODO: remove this once we figure out properly where and how
            // PROCESS_EVENT = 1112
            // PROCESS_EVENT = 1112
            // EVENT SUBTYPE: START = 1
            // KEY_STATE = 1
            // KEY_NAME: 1
            // KEY_PACKAGE_NAME: 1002
            // KEY_UID: 2
            // KEY_UID: 2
            StatsLog.writeArray(1112, 1, 1, name, 2, uid);
            StatsLog.writeArray(1112, 1, 1, 1002, name, 2, uid);
        }
        }
    }
    }


@@ -313,10 +313,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub


            // TODO: remove this once we figure out properly where and how
            // TODO: remove this once we figure out properly where and how
            // PROCESS_EVENT = 1112
            // PROCESS_EVENT = 1112
            // EVENT SUBTYPE: CRASH = 2
            // KEY_STATE = 1
            // KEY_NAME: 1
            // KEY_PACKAGE_NAME: 1002
            // KEY_UID: 2
            // KEY_UID: 2
            StatsLog.writeArray(1112, 2, 1, name, 2, uid);
            StatsLog.writeArray(1112, 1, 2, 1002, name, 2, uid);
        }
        }
    }
    }


@@ -550,10 +550,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub
        synchronized (mStats) {
        synchronized (mStats) {
            mStats.noteScreenStateLocked(state);
            mStats.noteScreenStateLocked(state);
            // TODO: remove this once we figure out properly where and how
            // TODO: remove this once we figure out properly where and how
            // SCREEN_EVENT = 1003
            // SCREEN_EVENT = 2
            // State key: 1
            // KEY_STATE: 1
            // State value: state. We can change this to our own def later.
            // State value: state. We can change this to our own def later.
            StatsLog.writeArray(1003, 1, state);
            StatsLog.writeArray(2, 1, state);
        }
        }
        if (DBG) Slog.d(TAG, "end noteScreenState");
        if (DBG) Slog.d(TAG, "end noteScreenState");
    }
    }