+30
−18
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Currently, the best battery profile is selected only based on the
profile which has the lowest delta from the battery id. For
example, if there are two profiles and if the second one has
lowest delta with the battery id, it would get selected as best
profile. However, the selection may not go through as that
profile can be outside the range. First profile whose battery id
delta is greater than the second profile but still in the valid
range will not be selected because the second profile was given
the precedence.
Fix this problem by validating whether the battery id of the
profile is within range and update the best profile based on
that.
CRs-Fixed: 755238
Change-Id: Ife0ad0e4d68d8e096328e1e1e6a3abfd73ab7408
Signed-off-by:
Subbaraman Narayanamurthy <subbaram@codeaurora.org>