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

Commit e03583e2 authored by yro's avatar yro
Browse files

Add missing key for temporary battery process event and missing tag id

for process
Test: tested locally

Change-Id: I1ef376ba9478e1e88ff09fb201078d4972d8d51b
parent 267fed4b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@ option java_outer_classname = "StatsConstantsProto";

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

enum KeyId {
+11 −11
Original line number 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
            // PROCESS_EVENT = 1112
            // EVENT SUBTYPE: START = 1
            // KEY_NAME: 1
            // KEY_STATE = 1
            // KEY_PACKAGE_NAME: 1002
            // 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
            // PROCESS_EVENT = 1112
            // EVENT SUBTYPE: CRASH = 2
            // KEY_NAME: 1
            // KEY_STATE = 1
            // KEY_PACKAGE_NAME: 1002
            // 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) {
            mStats.noteScreenStateLocked(state);
            // TODO: remove this once we figure out properly where and how
            // SCREEN_EVENT = 1003
            // State key: 1
            // SCREEN_EVENT = 2
            // KEY_STATE: 1
            // 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");
    }