From cc22d59eca3e8d0002c194d07852f30ed053ca6c Mon Sep 17 00:00:00 2001 From: Jan Pochyla Date: Thu, 6 Oct 2016 12:31:03 +0200 Subject: [PATCH] ui: clear the screen before common layouts --- src/apps/common/confirm.py | 4 +++- src/apps/common/request_pin.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/apps/common/confirm.py b/src/apps/common/confirm.py index 81f620974c..2f09b304b7 100644 --- a/src/apps/common/confirm.py +++ b/src/apps/common/confirm.py @@ -1,4 +1,4 @@ -from trezor import wire +from trezor import wire, ui from trezor.utils import unimport @@ -9,6 +9,7 @@ async def confirm(session_id, content=None, code=None, *args, **kwargs): from trezor.messages.ButtonRequestType import Other from trezor.messages.wire_types import ButtonAck + ui.display.clear() dialog = ConfirmDialog(content, *args, **kwargs) dialog.render() @@ -26,6 +27,7 @@ async def hold_to_confirm(session_id, content=None, code=None, *args, **kwargs): from trezor.messages.ButtonRequestType import Other from trezor.messages.wire_types import ButtonAck + ui.display.clear() button = Button((0, 240 - 48, 240, 48), 'Hold to confirm', normal_style=CONFIRM_BUTTON, active_style=CONFIRM_BUTTON_ACTIVE) diff --git a/src/apps/common/request_pin.py b/src/apps/common/request_pin.py index fc1753266a..7600102636 100644 --- a/src/apps/common/request_pin.py +++ b/src/apps/common/request_pin.py @@ -16,7 +16,7 @@ async def request_pin(session_id, *args, **kwargs): ButtonRequest(code=ProtectCall), ButtonAck) - ui.clear() + ui.display.clear() matrix = PinMatrix(*args, **kwargs) dialog = ConfirmDialog(matrix) if await dialog != CONFIRMED: