summaryrefslogtreecommitdiffstats
path: root/updater_sample/src/com/example/android/systemupdatersample/UpdateConfig.java
diff options
context:
space:
mode:
authorZhomart Mukhamejanov <zhomart@google.com>2018-05-11 00:00:57 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-05-11 00:00:57 +0200
commitcc65b655bb88d80964367cd92be42ff0ecdd3922 (patch)
treead7af8c019e59532b96ac38b33c345b1d1ced376 /updater_sample/src/com/example/android/systemupdatersample/UpdateConfig.java
parentMerge "updater_sample: add http header demo" am: fe5b3e2b2d (diff)
parentMerge "updater_sample: fix UpdateConfig" (diff)
downloadandroid_bootable_recovery-cc65b655bb88d80964367cd92be42ff0ecdd3922.tar
android_bootable_recovery-cc65b655bb88d80964367cd92be42ff0ecdd3922.tar.gz
android_bootable_recovery-cc65b655bb88d80964367cd92be42ff0ecdd3922.tar.bz2
android_bootable_recovery-cc65b655bb88d80964367cd92be42ff0ecdd3922.tar.lz
android_bootable_recovery-cc65b655bb88d80964367cd92be42ff0ecdd3922.tar.xz
android_bootable_recovery-cc65b655bb88d80964367cd92be42ff0ecdd3922.tar.zst
android_bootable_recovery-cc65b655bb88d80964367cd92be42ff0ecdd3922.zip
Diffstat (limited to 'updater_sample/src/com/example/android/systemupdatersample/UpdateConfig.java')
-rw-r--r--updater_sample/src/com/example/android/systemupdatersample/UpdateConfig.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/updater_sample/src/com/example/android/systemupdatersample/UpdateConfig.java b/updater_sample/src/com/example/android/systemupdatersample/UpdateConfig.java
index b08bfd0f6..9bdd8b9e8 100644
--- a/updater_sample/src/com/example/android/systemupdatersample/UpdateConfig.java
+++ b/updater_sample/src/com/example/android/systemupdatersample/UpdateConfig.java
@@ -79,9 +79,13 @@ public class UpdateConfig implements Parcelable {
p.getLong("offset"),
p.getLong("size"));
}
+ String authorization = null;
+ if (meta.has("authorization")) {
+ authorization = meta.getString("authorization");
+ }
c.mAbStreamingMetadata = new StreamingMetadata(
propertyFiles,
- meta.getString("authorization_token"));
+ authorization);
}
c.mRawJson = json;
return c;
@@ -196,7 +200,7 @@ public class UpdateConfig implements Parcelable {
}
public Optional<String> getAuthorization() {
- return Optional.of(mAuthorization);
+ return mAuthorization == null ? Optional.empty() : Optional.of(mAuthorization);
}
}