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
Loading
Please register or sign in to comment