Merge "Map error code 51 to an incorrect OS error."

This commit is contained in:
Alex Kershaw
2019-01-08 16:32:23 +00:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 0 deletions

View File

@@ -4494,6 +4494,7 @@ package android.os {
field public static final int PAYLOAD_HASH_MISMATCH_ERROR = 10; // 0xa
field public static final int PAYLOAD_MISMATCHED_TYPE_ERROR = 6; // 0x6
field public static final int PAYLOAD_SIZE_MISMATCH_ERROR = 11; // 0xb
field public static final int PAYLOAD_TIMESTAMP_ERROR = 51; // 0x33
field public static final int POST_INSTALL_RUNNER_ERROR = 5; // 0x5
field public static final int SUCCESS = 0; // 0x0
field public static final int UPDATED_BUT_NOT_ACTIVE = 52; // 0x34

View File

@@ -66,6 +66,7 @@ public class UpdateEngine {
public static final int PAYLOAD_HASH_MISMATCH_ERROR = 10;
public static final int PAYLOAD_SIZE_MISMATCH_ERROR = 11;
public static final int DOWNLOAD_PAYLOAD_VERIFICATION_ERROR = 12;
public static final int PAYLOAD_TIMESTAMP_ERROR = 51;
public static final int UPDATED_BUT_NOT_ACTIVE = 52;
}

View File

@@ -66,6 +66,9 @@ class AbUpdateInstaller extends UpdateInstaller {
map.put(
DOWNLOAD_STATE_INITIALIZATION_ERROR,
InstallUpdateCallback.UPDATE_ERROR_INCORRECT_OS_VERSION);
map.put(
UpdateEngine.ErrorCodeConstants.PAYLOAD_TIMESTAMP_ERROR,
InstallUpdateCallback.UPDATE_ERROR_INCORRECT_OS_VERSION);
// Error constants corresponding to errors related to bad update file.
map.put(