mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-05 13:48:02 +08:00
InputEventSource::closeScreenSaver add screensaver's callback
This commit is contained in:
parent
b67d47e449
commit
9b325a35ad
@ -80,6 +80,7 @@ InputEventSource& InputEventSource::getInstance(){
|
||||
}
|
||||
|
||||
void InputEventSource::setScreenSaver(ScreenSaver func,int timeout){
|
||||
if(mScreenSaver)mScreenSaver(false);
|
||||
mScreenSaver = func;
|
||||
mScreenSaveTimeOut = timeout;
|
||||
}
|
||||
@ -124,6 +125,7 @@ int InputEventSource::checkEvents(){
|
||||
void InputEventSource::closeScreenSaver(){
|
||||
mIsScreenSaveActived = false;
|
||||
mLastInputEventTime = SystemClock::uptimeMillis();
|
||||
if(mScreenSaver)mScreenSaver(false);
|
||||
}
|
||||
|
||||
bool InputEventSource::isScreenSaverActived()const{
|
||||
|
Loading…
Reference in New Issue
Block a user