mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-17 21:22:10 +00:00
fix(legacy): show dialog before rebooting to bootloader
This commit is contained in:
parent
e3539b0a73
commit
0d37824b01
@ -306,7 +306,20 @@ static bool fsm_layoutAddress(const char *address, const char *desc,
|
||||
}
|
||||
|
||||
void fsm_msgRebootToBootloader(void) {
|
||||
fsm_sendSuccess(_("You are being rebooted"));
|
||||
layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Confirm"), NULL,
|
||||
_("Do you want to"), _("restart device in"),
|
||||
_("bootloader mode?"), NULL, NULL, NULL);
|
||||
if (!protectButton(ButtonRequestType_ButtonRequest_ProtectCall, false)) {
|
||||
fsm_sendFailure(FailureType_Failure_ActionCancelled, NULL);
|
||||
layoutHome();
|
||||
return;
|
||||
}
|
||||
oledClear();
|
||||
oledRefresh();
|
||||
fsm_sendSuccess(_("Rebooting"));
|
||||
// make sure the outgoing message is sent
|
||||
usbPoll();
|
||||
usbSleep(500);
|
||||
#if !EMULATOR
|
||||
svc_reboot_to_bootloader();
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user