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

Couple mResumedActivity to Activity lifecycle.

mResumedActivity is a cached reference to the currently resumed
activity in a stack. Previously, this value was set on demand at
various points in the code. This can lead to discord with the
ActivityRecord if the activity updates state without the containing
ActivityStack being directly aware of the change.

This changelist addresses the issue by placing mResumedActivity
behind an accessor. A callback path has been added from
ActivityRecord to the ActivityStack, signaling when the activity's
state has changed. The stack can then update the state accordingly.

Test: atest FrameworksServicesTests:com.android.server.am.ActivityStackTests#testResumedActivity
Bug: 66344012
Fixes: 74118620
Change-Id: If950fd4c41f044ec67722ccc5b1d631cead70bce
parent 999e97f4
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