Android: Print the error code string from the client.
The update_engine_client needs to translate the numeric ErrorCode to a
string name that can be printed on the output. This patch moves the
ErrorCodeToString() function to a new error_code_utils.{h,cc} pair of
files so it can be included easily from the client binary and uses it
in the Android update_engine_client.
Bug: 25631767
Bug: 25598547
TEST=`update_engine_client --update` prints the error message in a non-Brillo device.
Change-Id: Ib40813924ec676f3e703412de90d389b2596177e
diff --git a/Android.mk b/Android.mk
index bebcc52..65ae2de 100644
--- a/Android.mk
+++ b/Android.mk
@@ -153,6 +153,7 @@
common/clock.cc \
common/constants.cc \
common/cpu_limiter.cc \
+ common/error_code_utils.cc \
common/hash_calculator.cc \
common/http_common.cc \
common/http_fetcher.cc \
@@ -474,6 +475,7 @@
LOCAL_SRC_FILES := \
binder_bindings/android/os/IUpdateEngine.aidl \
binder_bindings/android/os/IUpdateEngineCallback.aidl \
+ common/error_code_utils.cc \
update_engine_client_android.cc \
update_status_utils.cc
endif # !defined(BRILLO)