diff options
| author | Tianjie Xu <xunchang@google.com> | 2021-02-05 18:36:48 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-02-05 18:36:48 +0000 |
| commit | 90772648cd1ea357ee2529871e91f1ffd422ee36 (patch) | |
| tree | 01544f20b7d84e119e7cd5eec78eec4761adeb88 /core/java/android | |
| parent | de2340c0e9235936c79aa01bbb33f0250c3c4f98 (diff) | |
| parent | d5567fea8e1d6127e6d532ddd2454383db81d8c6 (diff) | |
Merge "Update Java doc for ResumeOnReboot"
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/service/resumeonreboot/ResumeOnRebootService.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/core/java/android/service/resumeonreboot/ResumeOnRebootService.java b/core/java/android/service/resumeonreboot/ResumeOnRebootService.java index 4ebaa96f4be2..ad49ffd57dc2 100644 --- a/core/java/android/service/resumeonreboot/ResumeOnRebootService.java +++ b/core/java/android/service/resumeonreboot/ResumeOnRebootService.java @@ -87,7 +87,9 @@ public abstract class ResumeOnRebootService extends Service { * Implementation for wrapping the opaque blob used for resume-on-reboot prior to * reboot. The service should not assume any structure of the blob to be wrapped. The * implementation should wrap the opaque blob in a reasonable time or throw {@link IOException} - * if it's unable to complete the action. + * if it's unable to complete the action due to retry-able errors (e.g network errors) + * and {@link IllegalArgumentException} if {@code wrapBlob} fails due to fatal errors + * (e.g corrupted blob). * * @param blob The opaque blob with size on the order of 100 bytes. * @param lifeTimeInMillis The life time of the blob. This must be strictly enforced by the @@ -95,7 +97,8 @@ public abstract class ResumeOnRebootService extends Service { * this function after expiration should * fail. * @return Wrapped blob to be persisted across reboot with size on the order of 100 bytes. - * @throws IOException if the implementation is unable to wrap the blob successfully. + * @throws IOException if the implementation is unable to wrap the blob successfully due to + * retry-able errors. */ @NonNull public abstract byte[] onWrap(@NonNull byte[] blob, @DurationMillisLong long lifeTimeInMillis) @@ -106,12 +109,13 @@ public abstract class ResumeOnRebootService extends Service { * operation would happen after reboot during direct boot mode (i.e before device is unlocked * for the first time). The implementation should unwrap the wrapped blob in a reasonable time * and returns the result or throw {@link IOException} if it's unable to complete the action - * and {@link IllegalArgumentException} if {@code unwrapBlob} fails because the wrappedBlob is - * stale. + * due to retry-able errors (e.g network error) and {@link IllegalArgumentException} + * if {@code unwrapBlob} fails due to fatal errors (e.g stale or corrupted blob). * * @param wrappedBlob The wrapped blob with size on the order of 100 bytes. * @return Unwrapped blob used for resume-on-reboot with the size on the order of 100 bytes. - * @throws IOException if the implementation is unable to unwrap the wrapped blob successfully. + * @throws IOException if the implementation is unable to unwrap the wrapped blob successfully + * due to retry-able errors. */ @NonNull public abstract byte[] onUnwrap(@NonNull byte[] wrappedBlob) throws IOException; |
