am 70273e05: Merge "Stop activity onVisibleBehindCanceled()" into lmp-mr1-dev
* commit '70273e05b26f671dcec9ff1aa4bafabb5e407895': Stop activity onVisibleBehindCanceled()
This commit is contained in:
@@ -6260,7 +6260,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
ActivityStack stack = ActivityRecord.getStackLocked(token);
|
ActivityStack stack = ActivityRecord.getStackLocked(token);
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
stack.backgroundResourcesReleased(token);
|
stack.backgroundResourcesReleased();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -3317,17 +3317,18 @@ final class ActivityStack {
|
|||||||
mHandler.sendEmptyMessageDelayed(RELEASE_BACKGROUND_RESOURCES_TIMEOUT_MSG, 500);
|
mHandler.sendEmptyMessageDelayed(RELEASE_BACKGROUND_RESOURCES_TIMEOUT_MSG, 500);
|
||||||
} else {
|
} else {
|
||||||
Slog.e(TAG, "releaseBackgroundResources: activity " + r + " no longer running");
|
Slog.e(TAG, "releaseBackgroundResources: activity " + r + " no longer running");
|
||||||
backgroundResourcesReleased(r.appToken);
|
backgroundResourcesReleased();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final void backgroundResourcesReleased(IBinder token) {
|
final void backgroundResourcesReleased() {
|
||||||
mHandler.removeMessages(RELEASE_BACKGROUND_RESOURCES_TIMEOUT_MSG);
|
mHandler.removeMessages(RELEASE_BACKGROUND_RESOURCES_TIMEOUT_MSG);
|
||||||
final ActivityRecord r = getVisibleBehindActivity();
|
final ActivityRecord r = getVisibleBehindActivity();
|
||||||
if (r != null) {
|
if (r != null) {
|
||||||
mStackSupervisor.mStoppingActivities.add(r);
|
mStackSupervisor.mStoppingActivities.add(r);
|
||||||
setVisibleBehindActivity(null);
|
setVisibleBehindActivity(null);
|
||||||
|
mStackSupervisor.scheduleIdleTimeoutLocked(null);
|
||||||
}
|
}
|
||||||
mStackSupervisor.resumeTopActivitiesLocked();
|
mStackSupervisor.resumeTopActivitiesLocked();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user