From 494f8de3dfcee74efa6577dd35db6e5cdc6c69f8 Mon Sep 17 00:00:00 2001 From: Alex Kershaw Date: Wed, 22 May 2019 15:54:31 +0100 Subject: [PATCH] Add a mapping for kDownloadMetadataSignatureMismatch. Add a mapping for kDownloadMetadataSignatureMismatch (26) from error_code.h. This involves creating a new system API constant, but it's just a simple definition so we don't have to hard-code '26'. These constants are already set in error_code.h. A TODO has been added to create this constant in the next release. Test: manual Bug: 132827080 Bug: 133396459 Change-Id: I4d59702879f2ed654dd467a1ae2dc8e400a0938d --- .../com/android/server/devicepolicy/AbUpdateInstaller.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/AbUpdateInstaller.java b/services/devicepolicy/java/com/android/server/devicepolicy/AbUpdateInstaller.java index 5acf83aeb8904..a9662c919a64e 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/AbUpdateInstaller.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/AbUpdateInstaller.java @@ -85,6 +85,10 @@ class AbUpdateInstaller extends UpdateInstaller { map.put( UpdateEngine.ErrorCodeConstants.PAYLOAD_HASH_MISMATCH_ERROR, InstallSystemUpdateCallback.UPDATE_ERROR_UPDATE_FILE_INVALID); + // TODO(b/133396459): replace with a constant. + map.put( + 26 /* kDownloadMetadataSignatureMismatch */, + InstallSystemUpdateCallback.UPDATE_ERROR_UPDATE_FILE_INVALID); // Error constants corresponding to errors related to devices bad state. map.put(