summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-05-04 22:03:18 +0200
committerTao Bao <tbao@google.com>2017-09-13 19:51:09 +0200
commitbd0ddcd5e8794511395bf668833acc5c2da69fb0 (patch)
tree4e9b138c4234d80b88cc856effa3f55e340044f5 /recovery.cpp
parentMerge "Close cmd_pipe properly after updater test finishes" (diff)
downloadandroid_bootable_recovery-bd0ddcd5e8794511395bf668833acc5c2da69fb0.tar
android_bootable_recovery-bd0ddcd5e8794511395bf668833acc5c2da69fb0.tar.gz
android_bootable_recovery-bd0ddcd5e8794511395bf668833acc5c2da69fb0.tar.bz2
android_bootable_recovery-bd0ddcd5e8794511395bf668833acc5c2da69fb0.tar.lz
android_bootable_recovery-bd0ddcd5e8794511395bf668833acc5c2da69fb0.tar.xz
android_bootable_recovery-bd0ddcd5e8794511395bf668833acc5c2da69fb0.tar.zst
android_bootable_recovery-bd0ddcd5e8794511395bf668833acc5c2da69fb0.zip
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 6f62ff17c..d037b7971 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -125,6 +125,10 @@ static const int BATTERY_WITH_CHARGER_OK_PERCENTAGE = 15;
static constexpr const char* RECOVERY_WIPE = "/etc/recovery.wipe";
static constexpr const char* DEFAULT_LOCALE = "en-US";
+// We define RECOVERY_API_VERSION in Android.mk, which will be picked up by build system and packed
+// into target_files.zip. Assert the version defined in code and in Android.mk are consistent.
+static_assert(kRecoveryApiVersion == RECOVERY_API_VERSION, "Mismatching recovery API versions.");
+
static std::string locale;
static bool has_cache = false;
@@ -1498,7 +1502,7 @@ int main(int argc, char **argv) {
property_list(print_property, NULL);
printf("\n");
- ui->Print("Supported API: %d\n", RECOVERY_API_VERSION);
+ ui->Print("Supported API: %d\n", kRecoveryApiVersion);
int status = INSTALL_SUCCESS;