feat(core): remove connect to host dialog in the bootloader

pull/1515/head
Ondrej Mikle 3 years ago committed by Pavol Rusnak
parent f3ae3615c7
commit a4ba24645b
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -246,8 +246,6 @@ int main(void) {
check_bootloader_version();
#endif
main_start:
display_clear();
// delay to detect touch
@ -262,6 +260,7 @@ main_start:
vendor_header vhdr;
image_header hdr;
secbool stay_in_bootloader = sectrue; // flag to stay in bootloader
// detect whether the devices contains a valid firmware
@ -309,48 +308,19 @@ main_start:
if (bootloader_usb_loop(NULL, NULL) != sectrue) {
return 1;
}
} else
// ... or if user touched the screen on start
if (touched) {
// show firmware info with connect buttons
// no ui_fadeout(); - we already start from black screen
ui_screen_info(sectrue, &vhdr, &hdr);
ui_fadein();
for (;;) {
int response = ui_user_input(INPUT_CONFIRM | INPUT_CANCEL | INPUT_INFO);
ui_fadeout();
// if cancel was pressed -> restart
if (INPUT_CANCEL == response) {
goto main_start;
}
// if confirm was pressed -> jump out
if (INPUT_CONFIRM == response) {
// show firmware info without connect buttons
ui_screen_info(secfalse, &vhdr, &hdr);
ui_fadein();
break;
} else {
// ... or if user touched the screen on start
// ... or we have stay_in_bootloader flag to force it
if (touched || stay_in_bootloader == sectrue) {
// no ui_fadeout(); - we already start from black screen
ui_screen_info(secfalse, &vhdr, &hdr);
ui_fadein();
// and start the usb loop
if (bootloader_usb_loop(&vhdr, &hdr) != sectrue) {
return 1;
}
// if info icon was pressed -> show fingerprint
if (INPUT_INFO == response) {
// show fingerprint
ui_screen_info_fingerprint(&hdr);
ui_fadein();
while (INPUT_LONG_CONFIRM != ui_user_input(INPUT_LONG_CONFIRM)) {
}
ui_fadeout();
ui_screen_info(sectrue, &vhdr, &hdr);
ui_fadein();
}
}
// and start the usb loop
if (bootloader_usb_loop(&vhdr, &hdr) != sectrue) {
return 1;
}
}

Loading…
Cancel
Save