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

Commit 97c6d3d4 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Add event logging for UserState transitions.

Event log sticks around longer, and will help debug timing issues.

Test: builds and boots
Bug: 32719353
Change-Id: Ie19f76a341c58a8efee0eb1edbf183c22e9c5270
parent 850c83e6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -112,3 +112,5 @@ option java_package com.android.server.am
# Report changing memory conditions (Values are ProcessStats.ADJ_MEM_FACTOR* constants)
30050 am_mem_factor (Current|1|5),(Previous|1|5)

# UserState has changed
30051 am_user_state_changed (id|1|5),(state|1|5)
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ public final class UserState {
    public boolean setState(int oldState, int newState) {
        if (state == oldState) {
            setState(newState);
            EventLogTags.writeAmUserStateChanged(mHandle.getIdentifier(), newState);
            return true;
        } else {
            Slog.w(TAG, "Expected user " + mHandle.getIdentifier() + " in state "