InputEventSource::closeScreenSaver add screensaver's callback

This commit is contained in:
侯歌 2024-05-13 17:09:44 +08:00
parent b67d47e449
commit 9b325a35ad

View File

@ -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{