Set `mStatus` when `dispatchNextRestore` encounters a transport error
`PerformUnifiedRestoreTask` is a state-machine that is responsible for restoring the backups a given set of packages. At every point in this process it's possible for a transport error to occur. This is treated as a fatal error, immediately moving the state machine into the `FINAL` state. The `mStatus` variable is used to indicate the result in the `RestoreObserver.restoreFinished` callback. A non-zero value for `mStatus` indicates something failed during restore. `dispatchNextRestore` is the only place in this state machine where a transport error does not set `mStatus` to `TRANSPORT_ERROR`, even though the state is set to `FINAL`. As a result, the `RestoreObserver` listener is likely to wrongly assume that the restore succeeded in this particular case. Bug: 283932000 Test: atest services/tests/mockingservicestests/src/com/android/server/backup Test: Manual testing with custom build that returns an error in `dispatchNextRestore`. Change-Id: I769e8200ad4ac12b58dbb8c8181b21ff9933453a
Loading
Please register or sign in to comment