mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 05:49:27 +00:00
Instead of calling ScheduleBatteryUpdate() every time a uevent has been received, only call it after the netlink socket receive buffer has been drained. This change is safe because the contents of the power supply uevent messages is ignored. A subtle change in this CL is that an additional call to uevent_kernel_multicast_recv() is introduced after all the receive buffer has been drained. In case of a receive buffer overflow, this extra call will receive and clear the socket error (sk_err). Bug: 362986353 Change-Id: Ic1c489dde3338f0142def743b4cd654363517486 Signed-off-by: Bart Van Assche <bvanassche@google.com>