Loading
StagingManager: notify failed sessions to apexd
StagingManager.restoreSessions() needs to handle inconsistency between
StagedSession and ApexSession. For example, when an ApexSession is in
"impossible state" (e.g. STAGED or VERIFIED), corresponding
StagedSession is marked as failed. This leads to yet another
inconsistency: ApexSession becomes "dangling" or "unknown" because the
StagedSession is destroyed.
These ApexSessions ("impossible state" or "dangling") won't be removed
and remain on a device forever.
In this commit, StagingManager notifies the "failure" to apexd by
calling abortStagedSession(id), which destroys ApexSessions.
Bug: 425478146
Flag: EXEMPT bug fix
Test: atest StagingManagerTest
Change-Id: Ibe9f949bc6d1bcdabf3f9102de8b98f069408350