diff options
author | Sen Jiang <senj@google.com> | 2016-12-14 23:40:46 +0100 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-12-14 23:40:46 +0100 |
commit | 8c179f8bd4bea6fad3e2cb78cfbbbcc7cdd8e012 (patch) | |
tree | 772d13e0103a1b868fbb4c22e3e664eeb6b55430 /recovery.cpp | |
parent | Merge "updater: Fix the operator order." am: 2bb3a2270e am: f7f3f821a8 am: e97575e7ae (diff) | |
parent | Merge "Add a stub recovery UI." am: 8c1584feaf am: 2f8f6ec0fc (diff) | |
download | android_bootable_recovery-8c179f8bd4bea6fad3e2cb78cfbbbcc7cdd8e012.tar android_bootable_recovery-8c179f8bd4bea6fad3e2cb78cfbbbcc7cdd8e012.tar.gz android_bootable_recovery-8c179f8bd4bea6fad3e2cb78cfbbbcc7cdd8e012.tar.bz2 android_bootable_recovery-8c179f8bd4bea6fad3e2cb78cfbbbcc7cdd8e012.tar.lz android_bootable_recovery-8c179f8bd4bea6fad3e2cb78cfbbbcc7cdd8e012.tar.xz android_bootable_recovery-8c179f8bd4bea6fad3e2cb78cfbbbcc7cdd8e012.tar.zst android_bootable_recovery-8c179f8bd4bea6fad3e2cb78cfbbbcc7cdd8e012.zip |
Diffstat (limited to 'recovery.cpp')
-rw-r--r-- | recovery.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/recovery.cpp b/recovery.cpp index f53e20c8c..0fdc31cb4 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -68,6 +68,7 @@ #include "roots.h" #include "rotate_logs.h" #include "screen_ui.h" +#include "stub_ui.h" #include "ui.h" static const struct option OPTIONS[] = { @@ -1471,8 +1472,11 @@ int main(int argc, char **argv) { Device* device = make_device(); ui = device->GetUI(); + if (!ui->Init()) { + printf("Failed to initialize UI, use stub UI instead."); + ui = new StubRecoveryUI(); + } ui->SetLocale(locale.c_str()); - ui->Init(); // Set background string to "installing security update" for security update, // otherwise set it to "installing system update". ui->SetSystemUpdateText(security_update); |