Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 52646191 authored by Bart Van Assche's avatar Bart Van Assche
Browse files

libhealthloop: Reduce the number of ScheduleBatteryUpdate() calls



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: default avatarBart Van Assche <bvanassche@google.com>
parent 1f2a9d0b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment