Commit Graph

8 Commits

Author SHA1 Message Date
Matt Mower
9472ba1d39 gui: Actions: Toggle backlight on power key
Create GUIAction to handle KEY_POWER with a screen backlight toggle.

Change-Id: Iad0a7923b4a776e0336722db74d6fc46cd0107a2
2017-01-18 19:55:33 +01:00
that
fb759d45f5 gui: simplify blanktimer
- get rid of separate thread, check timer in rendering thread instead
- use an enum for the blanking state instead of magic integers
- move #ifdefs for TW_NO_SCREEN_TIMEOUT inside blanktimer class
- move some #includes and enum TOUCH_STATE to pages.hpp

Change-Id: Id4b104e3680dc5db41d8ba85e32d722cf4086299
2015-01-11 12:16:53 +01:00
xNUTx
e85f02dd91 Support reading since_epoch and secondary brightness files
TWFunc::Fixup_Time_On_Boot: Will now try to read
/sys/class/rtc/rtc0/since_epoch to correct time, if that fails
it will try to use the ats files to correct time.

TWFunc::Set_Brightness: One single function to set brightness
from both the automated functions and the gui actions. It is
able to set a second brightness path if present, it will set
them both the same value. Many Sony devices have 2 brightness
files in the sysfs that must be set to properly set the
brightness.

Change-Id: I7ca582109085dfbcb46b8de73ad031e4b7903fca
2014-08-10 08:57:14 -05:00
Vojtech Bocek
fafb0c541b Unify indentation and little clean-up in TWRP files
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2013-08-24 07:56:48 -05:00
gordon1337
0d9133d654 Do not render the GUI when the blanktimer turns off the display.
Normally, when the display has been turned off by blanktimer, the GUI actually still renders the GUI elements (eg. progressbar while doing backup/restore/etc.)
This patch will check whenever the display is turned off, and if it is turned off simply dont render. This avoids heating up the device and will save battery.
2013-06-08 14:17:07 +02:00
Dees_Troy
70237dc675 Add 2 second pre-dim and bugfix blank timer
2 second predim code courtesy of bigbiff

Change-Id: I052ac422f78dc82c05f58c188587534b800b935a
2013-02-28 19:36:09 -06:00
Dees_Troy
2f9117af30 Configurable timeout and brightness settings
Change-Id: I924297ab0dcf920cd4b4b617949c3b16cbc68e43
2013-02-20 09:35:23 -06:00
bigbiff bigbiff
8a68c31ffc This adds a 60 second screen timeout for TWRP. Might consider making this configurable in the future.
Will also set overlay to lockscreen so we don't have inadvetent screen selections.
Touching the screen will bring the display back up.
add back check script for poweroff
move diff time function to twrp-functions.cpp
make sure we chmod after copy_file
add read_file and write_file functions to twrp-functions.cpp
make single thread
try to force update screen
add forceRender
drop caches after tar processing

Change-Id: I3c5c509dd39dbb05451bbfe5d8b56d53c90d8d1b
2013-02-13 13:16:03 -06:00