Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5a009f90 authored by Christopher Tate's avatar Christopher Tate
Browse files

Adjust full restore API

Introduces a new constant, BackupTransport.NO_MORE_DATA, defined to
be -1.  The transport returns this constant when asked for the next
chunk of streaming full restore data to indicate that it has reached
EOF on the current restore target's archive stream.

If the transport returns TRANSPORT_PACKAGE_REJECTED from that same
method, then the OS will abort the current target's restore operation
and move on to the next package in the overall restore dataset (by
calling nextRestorePackage() on the transport).

If the transport returns zero when asked for the next chunk of
restore stream data, this will be interpreted as meaning that no data
is currently deliverable but the restore download is still running
properly; the caller will then retry until either data is delivered
or the transport reports NO_MORE_DATA (or an error).

Also sketched in the implementation of this latest API in the
test LocalTransport.

Bug 15330073

Change-Id: I81621cb322f831460133b7dced5bb88d2a4124e1
parent 9c46e064
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