1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00

activate screensaver on ClearSession message

This commit is contained in:
Pavol Rusnak 2015-04-13 19:52:38 +02:00
parent ea7e92f5dd
commit 1501ca2f67
3 changed files with 11 additions and 2 deletions

View File

@ -448,6 +448,7 @@ void fsm_msgClearSession(ClearSession *msg)
{ {
(void)msg; (void)msg;
session_clear(true); // clear PIN as well session_clear(true); // clear PIN as well
layoutScreensaver();
fsm_sendSuccess("Session cleared"); fsm_sendSuccess("Session cleared");
} }

View File

@ -49,14 +49,21 @@ void layoutProgressSwipe(const char *desc, int permil)
layoutProgress(desc, permil); layoutProgress(desc, permil);
} }
void layoutScreensaver(void)
{
layoutLast = layoutScreensaver;
oledClear();
oledRefresh();
}
void layoutHome(void) void layoutHome(void)
{ {
if (layoutLast == layoutHome) { if (layoutLast == layoutHome || layoutLast == layoutScreensaver) {
oledClear(); oledClear();
} else { } else {
layoutLast = layoutHome;
oledSwipeLeft(); oledSwipeLeft();
} }
layoutLast = layoutHome;
const char *label = storage_getLabel(); const char *label = storage_getLabel();
const uint8_t *homescreen = storage_getHomescreen(); const uint8_t *homescreen = storage_getHomescreen();
if (homescreen) { if (homescreen) {

View File

@ -26,6 +26,7 @@
void layoutDialogSwipe(LayoutDialogIcon icon, const char *btnNo, const char *btnYes, const char *desc, const char *line1, const char *line2, const char *line3, const char *line4, const char *line5, const char *line6); void layoutDialogSwipe(LayoutDialogIcon icon, const char *btnNo, const char *btnYes, const char *desc, const char *line1, const char *line2, const char *line3, const char *line4, const char *line5, const char *line6);
void layoutProgressSwipe(const char *desc, int permil); void layoutProgressSwipe(const char *desc, int permil);
void layoutScreensaver(void);
void layoutHome(void); void layoutHome(void);
void layoutConfirmOutput(const CoinType *coin, const TxOutputType *out); void layoutConfirmOutput(const CoinType *coin, const TxOutputType *out);
void layoutConfirmTx(const CoinType *coin, uint64_t amount_out, uint64_t amount_fee); void layoutConfirmTx(const CoinType *coin, uint64_t amount_out, uint64_t amount_fee);