Skip to content
Commit 6ff1707b authored by Bryce Lee's avatar Bryce Lee
Browse files

Do not always destroy activity when cleaning up.

There are some invocations of ActivityStack#cleanUpActivityLocked
where the activity is not removed from history. In this case, we
want to keep the ActivityRecord around, but clear the process.
Previously, we were also setting the state to destroy. This is
inconsistent with the client side state, which is still in the
stopped state. With recent changes, this state change now causes
the server side record to be destroyed, removing it from history
and causing it to not return on back traversal.

This changelist separates clearing the app process from setting the
activity state, allowing for the record to remain when appropriate.

Bug: 71506345
Test: atest CtsActivityManagerDeviceTestCases:ActivityLifecycleTests#testRestoreFromKill
Test: atest FrameworksServicesTests:com.android.server.am.ActivityRecordTests#testFinishingAfterDestroying
Test: atest FrameworksServicesTests:com.android.server.am.ActivityRecordTests#testFinishingAfterDestroyed
Change-Id: I98366a1b51d8d4d002536683c6335ee57c22129c
parent 3f6bd7b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment