File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3187,6 +3187,15 @@ def on_click(self, event_obj):
31873187
31883188
31893189class BacklightSetting (AnimScreen ):
3190+ @classmethod
3191+ def page_is_visible (cls ) -> bool :
3192+ try :
3193+ if cls ._instance is not None and cls ._instance .is_visible ():
3194+ return True
3195+ except Exception :
3196+ pass
3197+ return False
3198+
31903199 def __init__ (self , prev_scr = None ):
31913200 if not hasattr (self , "_init" ):
31923201 self ._init = True
Original file line number Diff line number Diff line change @@ -177,7 +177,10 @@ def lcd_resume(timeouts_ms: int | None = None) -> bool:
177177 uart .ctrl_wireless_charge (False )
178178 if display .backlight () != device .get_brightness () or timeouts_ms :
179179 global AUTO_POWER_OFF
180- display .backlight (device .get_brightness ())
180+ from trezor .lvglui .scrs .homescreen import BacklightSetting
181+
182+ if not BacklightSetting .page_is_visible ():
183+ display .backlight (device .get_brightness ())
181184 AUTO_POWER_OFF = False
182185 from trezor .lvglui .scrs import fingerprints
183186
You can’t perform that action at this time.
0 commit comments