Improve logging for why a staged session was reverted
mFailureReason gets populated with actual reason when we try to resume the staged session in checkpointing mode. But, if the device has a native crash due to which the device reboots even before we attempt to "resume" staged session, then it will never get populated. As such, during boot loops that occur earlier than "resume" of staged session, we end up logging nothing. In this CL, we improve on the scenario by falling back to using mNativeFailureReason if mFailureReason is empty. But this only works if our staged session contains APEX package in it. For apk-only staged sessions, we will still be logging blanks. Bug: 163787002 Test: atest ApexRollbackTests#testReasonForRevertIsLoggedDuringBootloop Change-Id: I5cd1733d66aa0b30855803b95eb9818dc81aa0d7
Loading
Please register or sign in to comment