Skip to content

Commit 5007ddd

Browse files
author
Christopher Tate
committed
Make sure to stop noHistory="true" activities properly
The code was correctly inducing a 'finish' when such an activity was being stopped, but then was not continuing with the rest of the stop bookkeeping at that point. In some circumstances this could result in an inconsistent state, with the activity marked as finishing but neither in the foreground nor stopped. Bug 6585403 Change-Id: Ib5c5be885bc6534e099e040d87a8589f7b7454ce
1 parent 0d8eba6 commit 5007ddd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

services/java/com/android/server/am/ActivityStack.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3282,7 +3282,9 @@ private final void stopActivityLocked(ActivityRecord r) {
32823282
requestFinishActivityLocked(r.appToken, Activity.RESULT_CANCELED, null,
32833283
"no-history");
32843284
}
3285-
} else if (r.app != null && r.app.thread != null) {
3285+
}
3286+
3287+
if (r.app != null && r.app.thread != null) {
32863288
if (mMainStack) {
32873289
if (mService.mFocusedActivity == r) {
32883290
mService.setFocusedActivityLocked(topRunningActivityLocked(null));

0 commit comments

Comments
 (0)