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

Commit a9a83f0d authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Always log new user state to event log

Previously it wasn't logged for stopping users...

Test: manual
Bug: 38121026
Change-Id: I0fc37224ce1043745dfffcc78639f003c35b402e
parent acbd7ba4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -69,7 +69,6 @@ public final class UserState {
    public boolean setState(int oldState, int newState) {
    public boolean setState(int oldState, int newState) {
        if (state == oldState) {
        if (state == oldState) {
            setState(newState);
            setState(newState);
            EventLogTags.writeAmUserStateChanged(mHandle.getIdentifier(), newState);
            return true;
            return true;
        } else {
        } else {
            Slog.w(TAG, "Expected user " + mHandle.getIdentifier() + " in state "
            Slog.w(TAG, "Expected user " + mHandle.getIdentifier() + " in state "
@@ -84,6 +83,7 @@ public final class UserState {
        }
        }
        Slog.i(TAG, "User " + mHandle.getIdentifier() + " state changed from "
        Slog.i(TAG, "User " + mHandle.getIdentifier() + " state changed from "
                + stateToString(state) + " to " + stateToString(newState));
                + stateToString(state) + " to " + stateToString(newState));
        EventLogTags.writeAmUserStateChanged(mHandle.getIdentifier(), newState);
        lastState = state;
        lastState = state;
        state = newState;
        state = newState;
    }
    }