diff options
| author | Tianjie Xu <xunchang@google.com> | 2019-05-15 13:59:39 -0700 |
|---|---|---|
| committer | Tianjie Xu <xunchang@google.com> | 2019-07-24 11:36:03 -0700 |
| commit | 164c60a4f3de934bab7035114546e9500cd8f232 (patch) | |
| tree | 0311dd6f33655ae9b5f1aec1847405bcd54673fb /install | |
| parent | 7965a95adc527dd6c2117833c96fb5382e6b9f11 (diff) | |
Clean up some global variables in common.h
Some global variables are only used for recovery.cpp and
recovery_main.cpp, remove them from common.h and handle their usage
accordingly. Variables include:
static constexpr int kRecoveryApiVersion;
extern struct selabel_handle* sehandle;
extern RecoveryUI* ui;
extern bool has_cache;
bool is_ro_debuggable();
Test: unit tests pass, boot into recovery mode and run graphic tests
Change-Id: If83a005786c9b38412731da97aaf85af69a3b917
Diffstat (limited to 'install')
| -rw-r--r-- | install/install.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/install/install.cpp b/install/install.cpp index 09b88392..9d67b010 100644 --- a/install/install.cpp +++ b/install/install.cpp @@ -60,7 +60,8 @@ using namespace std::chrono_literals; static constexpr int kRecoveryApiVersion = 3; -// Assert the version defined in code and in Android.mk are consistent. +// 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."); // Default allocation of progress bar segments to operations @@ -621,6 +622,8 @@ InstallResult InstallPackage(Package* package, const std::string_view package_id InstallResult result; std::vector<std::string> log_buffer; + ui->Print("Supported API: %d\n", kRecoveryApiVersion); + ui->Print("Finding update package...\n"); LOG(INFO) << "Update package id: " << package_id; if (!package) { |
