Skip to content
Snippets Groups Projects
Commit d99a1fc6 authored by Archie Pusaka's avatar Archie Pusaka
Browse files

Floss: Avoid non-empty battery result

Some peripherals don't have BAS profile but have other means to
convey the battery level. We have preferences to display the battery
level from BAS profile if that exists though.

However, sometimes (e.g. after device disconnection) the BAS profile
might reports empty battery result and it stays that way even after
reconnection. This causes battery conveyed via other means to be
meaningless because we use the empty result from BAS instead.

Update the behavior to prefer non-empty battery reports. Also, avoid
entering empty battery report by providing a remove battery API to
remove the entry instead of setting it empty.

Bug: 295577710
Tag: #Floss
Test: Disconnect/reconnect WH-1000XM3 multiple times. Observe the
      battery level is always displayed.
Change-Id: I10dd8ae8624f001cf539f5e0ac9b29655a76440b
parent d40fa757
No related branches found
No related tags found
No related merge requests found
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