OSDN Git Service

[ActivityManager] Fix index out of bounds when updating next pss time.
authorriddle_hsu <riddle_hsu@htc.com>
Tue, 31 Mar 2015 03:54:14 +0000 (11:54 +0800)
committerriddle_hsu <riddle_hsu@htc.com>
Tue, 31 Mar 2015 03:54:14 +0000 (11:54 +0800)
commit6793fc328ab4532202d86f64fe4fdbc3fb047bc4
treefd9ce1694dc8691706a43d1c25b473e6f88792bc
parent02c4bbb9648da99947da57b1605020340a334b5f
[ActivityManager] Fix index out of bounds when updating next pss time.

Symptom:
System server crash.

Root Cause:
The value curProcState for array index is -1 if the process
has not attached yet.

Solution:
Skip computing for process which is not attached or curProcState
is nonexistent state.

Change-Id: I71aaf45bb78d73097ebe9dfebf76b72f2d243232
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ProcessRecord.java