Perform activityIdleInternal in correct order.

Refactor of ActivityManagerService.activityIdle left
activityIdleInternalLocked called only if stopProfiling was true.
Calling it in all situations is the correct behavior.

Fixes bug 8532130.

Change-Id: Ibd7f112bab104094ff1b1f3a2fb8c03b527ec453
This commit is contained in:
Craig Mautner
2013-04-02 22:37:45 -07:00
parent bad8225336
commit 8be5ea3bdb

View File

@@ -4371,11 +4371,11 @@ public final class ActivityManagerService extends ActivityManagerNative
@Override
public final void activityIdle(IBinder token, Configuration config, boolean stopProfiling) {
final long origId = Binder.clearCallingIdentity();
if (stopProfiling) {
synchronized (this) {
ActivityStack stack = ActivityRecord.getStackLocked(token);
if (stack != null) {
ActivityRecord r = stack.activityIdleInternalLocked(token, false, config);
synchronized (this) {
ActivityStack stack = ActivityRecord.getStackLocked(token);
if (stack != null) {
ActivityRecord r = stack.activityIdleInternalLocked(token, false, config);
if (stopProfiling) {
if ((mProfileProc == r.app) && (mProfileFd != null)) {
try {
mProfileFd.close();