Loading recovery.cpp +6 −9 Original line number Diff line number Diff line Loading @@ -1136,8 +1136,6 @@ static void run_graphics_test(Device* device) { static int apply_from_storage(Device* device, const std::string& id, bool* wipe_cache) { modified_flash = true; int status; if (!vdc->volumeMount(id)) { return INSTALL_ERROR; } Loading Loading @@ -1185,7 +1183,7 @@ static int apply_from_storage(Device* device, const std::string& id, bool* wipe_ struct stat sb; if (stat(FUSE_SIDELOAD_HOST_PATHNAME, &sb) == -1) { if (errno == ENOENT && i < SDCARD_INSTALL_TIMEOUT-1) { if (errno == ENOENT) { sleep(1); now = time(NULL); continue; Loading Loading @@ -1276,7 +1274,7 @@ refresh: } if (status != INSTALL_SUCCESS && status != INSTALL_NONE) { ui->DialogShowErrorLog("Install failed"); ui->Print("Install failed"); } return status; Loading @@ -1297,7 +1295,7 @@ prompt_and_wait(Device* device, int status) { case INSTALL_ERROR: case INSTALL_CORRUPT: ui->SetBackground(RecoveryUI::D_ERROR); ui->SetBackground(RecoveryUI::ERROR); break; } ui->SetProgressType(RecoveryUI::EMPTY); Loading Loading @@ -1348,7 +1346,7 @@ prompt_and_wait(Device* device, int status) { if (status >= 0 && status != INSTALL_NONE) { if (status != INSTALL_SUCCESS) { ui->SetBackground(RecoveryUI::D_ERROR); ui->SetBackground(RecoveryUI::ERROR); ui->Print("Installation aborted.\n"); copy_logs(); } else if (!ui->IsTextVisible()) { Loading @@ -1357,7 +1355,6 @@ prompt_and_wait(Device* device, int status) { ui->Print("\nInstall complete.\n"); } } break; } break; Loading Loading @@ -1931,7 +1928,7 @@ int main(int argc, char **argv) { if (!sideload_auto_reboot && (status == INSTALL_ERROR || status == INSTALL_CORRUPT)) { copy_logs(); ui->SetBackground(RecoveryUI::D_ERROR); ui->SetBackground(RecoveryUI::ERROR); } Device::BuiltinAction after = shutdown_after ? Device::SHUTDOWN : Device::REBOOT; Loading screen_ui.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -364,7 +364,7 @@ void ScreenRecoveryUI::draw_screen_locked() { if (currentIcon == INSTALLING_UPDATE) { size_t y = header_height_ + 4; draw_background_locked(currentIcon); draw_background_locked(); SetColor(LOG); int cx, cy; Loading screen_ui.h +1 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ class ScreenRecoveryUI : public RecoveryUI { public: ScreenRecoveryUI(); virtual ~ScreenRecoveryUI() { } void Init(); void SetLocale(const char* locale); Loading Loading @@ -155,8 +156,6 @@ class ScreenRecoveryUI : public RecoveryUI { int stage, max_stage; int char_width_; int char_height_; pthread_mutex_t updateMutex; bool rtl_locale; Loading ui.cpp +4 −13 Original line number Diff line number Diff line Loading @@ -526,13 +526,6 @@ void RecoveryUI::handle_release(input_device* dev) { } } if (DialogShowing()) { if (DialogDismissable() && !dev->in_swipe) { DialogDismiss(); } return; } if (in_swipe) { if (abs(diff.x) > abs(diff.y)) { if (abs(diff.x) > min_swipe_px.x) { Loading Loading @@ -572,7 +565,6 @@ void RecoveryUI::handle_gestures(input_device* dev) { diff.y = dev->touch_pos.y - dev->touch_track.y; if (abs(diff.y) > MenuItemHeight()) { dev->in_swipe = true; if (!DialogShowing()) { dev->touch_track = dev->touch_pos; int key = (diff.y < 0) ? KEY_VOLUMEUP : KEY_VOLUMEDOWN; ProcessKey(dev, key, 1); Loading @@ -580,7 +572,6 @@ void RecoveryUI::handle_gestures(input_device* dev) { } } } } void RecoveryUI::EnqueueKey(int key_code) { pthread_mutex_lock(&key_queue_mutex); Loading wear_ui.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ void WearRecoveryUI::draw_background_locked(Icon icon) // Should only be called with updateMutex locked. void WearRecoveryUI::draw_progress_locked() { if (currentIcon == D_ERROR) return; if (currentIcon == ERROR) return; if (progressBarType != DETERMINATE) return; int width = progress_bar_width; Loading Loading @@ -298,8 +298,8 @@ void WearRecoveryUI::Init() LoadBitmap("icon_installing", &backgroundIcon[INSTALLING_UPDATE]); backgroundIcon[ERASING] = backgroundIcon[INSTALLING_UPDATE]; LoadBitmap("icon_error", &backgroundIcon[D_ERROR]); backgroundIcon[NO_COMMAND] = backgroundIcon[D_ERROR]; LoadBitmap("icon_error", &backgroundIcon[ERROR]); backgroundIcon[NO_COMMAND] = backgroundIcon[ERROR]; introFrames = (GRSurface**)malloc(intro_frames * sizeof(GRSurface*)); for (int i = 0; i < intro_frames; ++i) { Loading Loading
recovery.cpp +6 −9 Original line number Diff line number Diff line Loading @@ -1136,8 +1136,6 @@ static void run_graphics_test(Device* device) { static int apply_from_storage(Device* device, const std::string& id, bool* wipe_cache) { modified_flash = true; int status; if (!vdc->volumeMount(id)) { return INSTALL_ERROR; } Loading Loading @@ -1185,7 +1183,7 @@ static int apply_from_storage(Device* device, const std::string& id, bool* wipe_ struct stat sb; if (stat(FUSE_SIDELOAD_HOST_PATHNAME, &sb) == -1) { if (errno == ENOENT && i < SDCARD_INSTALL_TIMEOUT-1) { if (errno == ENOENT) { sleep(1); now = time(NULL); continue; Loading Loading @@ -1276,7 +1274,7 @@ refresh: } if (status != INSTALL_SUCCESS && status != INSTALL_NONE) { ui->DialogShowErrorLog("Install failed"); ui->Print("Install failed"); } return status; Loading @@ -1297,7 +1295,7 @@ prompt_and_wait(Device* device, int status) { case INSTALL_ERROR: case INSTALL_CORRUPT: ui->SetBackground(RecoveryUI::D_ERROR); ui->SetBackground(RecoveryUI::ERROR); break; } ui->SetProgressType(RecoveryUI::EMPTY); Loading Loading @@ -1348,7 +1346,7 @@ prompt_and_wait(Device* device, int status) { if (status >= 0 && status != INSTALL_NONE) { if (status != INSTALL_SUCCESS) { ui->SetBackground(RecoveryUI::D_ERROR); ui->SetBackground(RecoveryUI::ERROR); ui->Print("Installation aborted.\n"); copy_logs(); } else if (!ui->IsTextVisible()) { Loading @@ -1357,7 +1355,6 @@ prompt_and_wait(Device* device, int status) { ui->Print("\nInstall complete.\n"); } } break; } break; Loading Loading @@ -1931,7 +1928,7 @@ int main(int argc, char **argv) { if (!sideload_auto_reboot && (status == INSTALL_ERROR || status == INSTALL_CORRUPT)) { copy_logs(); ui->SetBackground(RecoveryUI::D_ERROR); ui->SetBackground(RecoveryUI::ERROR); } Device::BuiltinAction after = shutdown_after ? Device::SHUTDOWN : Device::REBOOT; Loading
screen_ui.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -364,7 +364,7 @@ void ScreenRecoveryUI::draw_screen_locked() { if (currentIcon == INSTALLING_UPDATE) { size_t y = header_height_ + 4; draw_background_locked(currentIcon); draw_background_locked(); SetColor(LOG); int cx, cy; Loading
screen_ui.h +1 −2 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ class ScreenRecoveryUI : public RecoveryUI { public: ScreenRecoveryUI(); virtual ~ScreenRecoveryUI() { } void Init(); void SetLocale(const char* locale); Loading Loading @@ -155,8 +156,6 @@ class ScreenRecoveryUI : public RecoveryUI { int stage, max_stage; int char_width_; int char_height_; pthread_mutex_t updateMutex; bool rtl_locale; Loading
ui.cpp +4 −13 Original line number Diff line number Diff line Loading @@ -526,13 +526,6 @@ void RecoveryUI::handle_release(input_device* dev) { } } if (DialogShowing()) { if (DialogDismissable() && !dev->in_swipe) { DialogDismiss(); } return; } if (in_swipe) { if (abs(diff.x) > abs(diff.y)) { if (abs(diff.x) > min_swipe_px.x) { Loading Loading @@ -572,7 +565,6 @@ void RecoveryUI::handle_gestures(input_device* dev) { diff.y = dev->touch_pos.y - dev->touch_track.y; if (abs(diff.y) > MenuItemHeight()) { dev->in_swipe = true; if (!DialogShowing()) { dev->touch_track = dev->touch_pos; int key = (diff.y < 0) ? KEY_VOLUMEUP : KEY_VOLUMEDOWN; ProcessKey(dev, key, 1); Loading @@ -580,7 +572,6 @@ void RecoveryUI::handle_gestures(input_device* dev) { } } } } void RecoveryUI::EnqueueKey(int key_code) { pthread_mutex_lock(&key_queue_mutex); Loading
wear_ui.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -114,7 +114,7 @@ void WearRecoveryUI::draw_background_locked(Icon icon) // Should only be called with updateMutex locked. void WearRecoveryUI::draw_progress_locked() { if (currentIcon == D_ERROR) return; if (currentIcon == ERROR) return; if (progressBarType != DETERMINATE) return; int width = progress_bar_width; Loading Loading @@ -298,8 +298,8 @@ void WearRecoveryUI::Init() LoadBitmap("icon_installing", &backgroundIcon[INSTALLING_UPDATE]); backgroundIcon[ERASING] = backgroundIcon[INSTALLING_UPDATE]; LoadBitmap("icon_error", &backgroundIcon[D_ERROR]); backgroundIcon[NO_COMMAND] = backgroundIcon[D_ERROR]; LoadBitmap("icon_error", &backgroundIcon[ERROR]); backgroundIcon[NO_COMMAND] = backgroundIcon[ERROR]; introFrames = (GRSurface**)malloc(intro_frames * sizeof(GRSurface*)); for (int i = 0; i < intro_frames; ++i) { Loading