Skip to content
Commit 7dd39bb7 authored by Andrii Kulian's avatar Andrii Kulian
Browse files

Refactor ActivityRecord#finish* methods

Updated ActivityRecord#finish* methods and to separate their purposes
and use better suited names.

ActivityRecord#finishIfPossible - start of activity finishing. In
most cases will first pause activity and wait for it to report back.

ActivityRecord#completeFinishing - second stage of the process, when
activity is no longer resumed. Usually will be called from 'paused'
callback on the server. If the next activity that should be shown in
place of the current one is not visible yet - it will defer the
finishing process and add the current activity to stopping list. If
next is already visible - will finish immediately.

ActivityRecord#destroyIfPossible - called when activity is ready to
be destroyed, or when the caller does not want to wait. Will initiate
the client destruction immediately, unless it's the last activity on
display.

Bug: 137329632
Test: atest CtsWindowManagerDeviceTestCases:android.server.wm.lifecycle
Test: atest WmTests:ActivityRecordTests
Change-Id: Id6e6dae306e2af91e9e00d9e66c416b13810ad93
parent 12f61509
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