The displaymanager thread is blocked in "read" call,
so it will never get chance to disable HWClock.
As we already use "select" to receive the "POLL IN" event of
the fd, we had better to set the "Non Blocking" flag on.
Jira: None.
Test: HWCLock thread is closed on Android after booting to
homescreen.
Signed-off-by: Zhongmin Wu <zhongmin.wu@intel.com>
return true;
}
+ int flags = fcntl(hotplug_fd_, F_GETFL, 0);
+ fcntl(hotplug_fd_, F_SETFL, flags | O_NONBLOCK);
+
fd_handler_.AddFd(hotplug_fd_);
if (!InitWorker()) {