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

Commit 1203aa05 authored by Christopher Tate's avatar Christopher Tate
Browse files

Docs: be explicit about oldState contract for backup helpers

Call out specifically that each helper must only consume the
prior-state data that it produced in the first place, not reading
beyond its own part of the state file.

Bug 25473872

Change-Id: I1f24a5738a799eb21d966510372a0f3852436166
parent 49ab8dd5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -50,7 +50,11 @@ public interface BackupHelper {
     * new state after performing the backup operation.
     * <p class="note">
     * <strong>Note:</strong> The helper should not close or seek either the {@code oldState} or
     * the {@code newState} file descriptors.</p>
     * the {@code newState} file descriptors.  It is essential that when reading the helper's
     * saved state from the {@code oldState} file, no extra content is consumed beyond
     * what was stored by this helper.  If more old state data is read, even accidentally,
     * it will make it impossible for additional helpers that may be invoked after this one
     * to properly reconstruct their prior state.</p>
     *
     * @param oldState An open, read-only {@link android.os.ParcelFileDescriptor} pointing to the
     *            last backup state provided by the application. May be