IndexOutOfBoundsException observed in ProcessStats

When the process dead, IndexOutOfBoundsException observed in ProcessStats
https://code.google.com/p/android/issues/detail?id=223791&thanks=223791&ts=1474967996

Change-Id: Idbe4adf060c6898e838b5eaeecf476ba6c3e586d
Signed-off-by: pengzhicai <pengzhicai@xiaomi.com>
This commit is contained in:
pengzhicai
2016-09-27 16:57:56 +08:00
committed by zhicai peng
parent 66f15cc01b
commit 5c6740a30c

View File

@@ -379,7 +379,7 @@ public final class ProcessState {
public void setState(int state, long now) {
ensureNotDead();
if (mCurState != state) {
if (!mDead && (mCurState != state)) {
//Slog.i(TAG, "Setting state in " + mName + "/" + mPackage + ": " + state);
commitStateTime(now);
mCurState = state;