gui: Actions: Toggle backlight on power key
Create GUIAction to handle KEY_POWER with a screen backlight toggle. Change-Id: Iad0a7923b4a776e0336722db74d6fc46cd0107a2
This commit is contained in:
@@ -198,6 +198,7 @@ GUIAction::GUIAction(xml_node<>* node)
|
||||
ADD_ACTION(mountsystemtoggle);
|
||||
ADD_ACTION(setlanguage);
|
||||
ADD_ACTION(checkforapp);
|
||||
ADD_ACTION(togglebacklight);
|
||||
|
||||
// remember actions that run in the caller thread
|
||||
for (mapFunc::const_iterator it = mf.begin(); it != mf.end(); ++it)
|
||||
@@ -1865,6 +1866,12 @@ int GUIAction::setlanguage(std::string arg __unused)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int GUIAction::togglebacklight(std::string arg __unused)
|
||||
{
|
||||
blankTimer.toggleBlank();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int GUIAction::setbootslot(std::string arg)
|
||||
{
|
||||
operation_start("Set Boot Slot");
|
||||
|
||||
Reference in New Issue
Block a user