commit | 6f26e71263fcbf634f858fe97d1a6e56a908c64f | [log] [tgz] |
---|---|---|
author | Zhomart Mukhamejanov <zhomart@google.com> | Fri May 18 10:15:31 2018 -0700 |
committer | Zhomart Mukhamejanov <zhomart@google.com> | Wed May 23 15:37:43 2018 -0700 |
tree | f646dd503527e3b3b6835c392744bf72296b20de | |
parent | 3a8b34893670a0bcd841ef9b915e08f039561e5f [diff] |
updater_sample: create UpdateManager - Add UpdateManager - responsible for the update logic. Now ui.MainActivity is responsible for only UI. - Create sample test for UpdateManager - Remove MainActivityTest - now MainActivity is really simple. - Add separate callback for progress update. - MainActivity: UpdateEngine#bind/unbind on pause/resume. Test: manually on the device Test: using JUnit4 Change-Id: I1dba7c4ec74b1afb520be762413cfc261ccfbc08 Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
diff --git a/updater_sample/src/com/example/android/systemupdatersample/util/PayloadSpecs.java b/updater_sample/src/com/example/android/systemupdatersample/util/PayloadSpecs.java index b98b97c..f062317 100644 --- a/updater_sample/src/com/example/android/systemupdatersample/util/PayloadSpecs.java +++ b/updater_sample/src/com/example/android/systemupdatersample/util/PayloadSpecs.java
@@ -32,7 +32,9 @@ import java.util.zip.ZipFile; /** The helper class that creates {@link PayloadSpec}. */ -public final class PayloadSpecs { +public class PayloadSpecs { + + public PayloadSpecs() {} /** * The payload PAYLOAD_ENTRY is stored in the zip package to comply with the Android OTA package
diff --git a/updater_sample/src/com/example/android/systemupdatersample/util/UpdateEngineErrorCodes.java b/updater_sample/src/com/example/android/systemupdatersample/util/UpdateEngineErrorCodes.java index 6d319c5..f06ddf7 100644 --- a/updater_sample/src/com/example/android/systemupdatersample/util/UpdateEngineErrorCodes.java +++ b/updater_sample/src/com/example/android/systemupdatersample/util/UpdateEngineErrorCodes.java
@@ -34,6 +34,7 @@ * Error code from the update engine. Values must agree with the ones in * system/update_engine/common/error_code.h. */ + public static final int UNKNOWN = -1; public static final int UPDATED_BUT_NOT_ACTIVE = 52; private static final SparseArray<String> CODE_TO_NAME_MAP = new SparseArray<>();