When calling Unlock within the timer callback, the timer value was not
initialized to 0. This causes the following issue where the lock remains locked
after being unlocked.
If there is no app using the boot sequence, display lock is not called.
Change-Id: Ia53e4aa5fd5e69f507285895ebd647e732328ee3
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
if (source_ != 0)
return;
+ if (QueueEmpty()) {
+ _W("Queue is empty");
+ return;
+ }
+
DisplayStateManager::GetInst().Lock();
source_ = g_timeout_add(100, OnRun, this);
}
timer_ = g_timeout_add(
5000, [](gpointer user_data) {
- static_cast<DisplayStateManager*>(user_data)->Unlock();
+ auto* handle = static_cast<DisplayStateManager*>(user_data);
+ handle->Unlock();
+ handle->timer_ = 0;
return G_SOURCE_REMOVE;
}, this);
}