Merge "Add event logging for UserState transitions."

This commit is contained in:
TreeHugger Robot
2016-11-10 00:02:12 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 0 deletions

View File

@@ -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)

View File

@@ -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 "