Files
Upsilon/apps/suspend_timer.cpp
Léa Saviot 29cb0672b8 [apps] The suspend timer dispatches an OnOff event.
The sandbox was not exited when the device suspended because of a long
time without use. When the device was powered on again, a blank sandbox
was displayed.
2018-12-11 09:34:12 +01:00

15 lines
322 B
C++

#include "suspend_timer.h"
#include "apps_container.h"
SuspendTimer::SuspendTimer(AppsContainer * container) :
Timer(k_idleBeforeSuspendDuration/Timer::TickDuration),
m_container(container)
{
}
bool SuspendTimer::fire() {
m_container->dispatchEvent(Ion::Events::OnOff);
m_container->suspend();
return false;
}