summaryrefslogtreecommitdiffstats
path: root/updater_sample/src/com/example/android/systemupdatersample/ui/MainActivity.java
diff options
context:
space:
mode:
authorZhomart Mukhamejanov <zhomart@google.com>2018-05-18 19:22:13 +0200
committerZhomart Mukhamejanov <zhomart@google.com>2018-05-18 19:38:33 +0200
commitb0361ffa3e25ab3e234a5ccaa5587b7dca88de76 (patch)
treedc99362d4eb95196eec3ceab8aafe88124c066a0 /updater_sample/src/com/example/android/systemupdatersample/ui/MainActivity.java
parentMerge "recovery: Reset optind to 1 after getopt" (diff)
downloadandroid_bootable_recovery-b0361ffa3e25ab3e234a5ccaa5587b7dca88de76.tar
android_bootable_recovery-b0361ffa3e25ab3e234a5ccaa5587b7dca88de76.tar.gz
android_bootable_recovery-b0361ffa3e25ab3e234a5ccaa5587b7dca88de76.tar.bz2
android_bootable_recovery-b0361ffa3e25ab3e234a5ccaa5587b7dca88de76.tar.lz
android_bootable_recovery-b0361ffa3e25ab3e234a5ccaa5587b7dca88de76.tar.xz
android_bootable_recovery-b0361ffa3e25ab3e234a5ccaa5587b7dca88de76.tar.zst
android_bootable_recovery-b0361ffa3e25ab3e234a5ccaa5587b7dca88de76.zip
Diffstat (limited to '')
-rw-r--r--updater_sample/src/com/example/android/systemupdatersample/ui/MainActivity.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/updater_sample/src/com/example/android/systemupdatersample/ui/MainActivity.java b/updater_sample/src/com/example/android/systemupdatersample/ui/MainActivity.java
index c5a7f9556..9bab1319d 100644
--- a/updater_sample/src/com/example/android/systemupdatersample/ui/MainActivity.java
+++ b/updater_sample/src/com/example/android/systemupdatersample/ui/MainActivity.java
@@ -77,6 +77,7 @@ public class MainActivity extends Activity {
new AtomicInteger(UpdateEngine.UpdateStatusConstants.IDLE);
private PayloadSpec mLastPayloadSpec;
private AtomicBoolean mManualSwitchSlotRequired = new AtomicBoolean(true);
+ private final PayloadSpecs mPayloadSpecs = new PayloadSpecs();
/**
* Listen to {@code update_engine} events.
@@ -338,7 +339,7 @@ public class MainActivity extends Activity {
if (config.getInstallType() == UpdateConfig.AB_INSTALL_TYPE_NON_STREAMING) {
PayloadSpec payload;
try {
- payload = PayloadSpecs.forNonStreaming(config.getUpdatePackageFile());
+ payload = mPayloadSpecs.forNonStreaming(config.getUpdatePackageFile());
} catch (IOException e) {
Log.e(TAG, "Error creating payload spec", e);
Toast.makeText(this, "Error creating payload spec", Toast.LENGTH_LONG)