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

Skip to content
Commit ec5b4b1e authored by Anthony Stange's avatar Anthony Stange
Browse files

Don't quantize max range with a resolution of 0

Sensors without a default resolution can be left with a resolution of 0
during initialization. Then, when the framework attempted to requantize
the max range using the resolution value, it would perform a
divide-by-zero operation. Encapsulate this logic with a check of the
resolution value to ensure this case doesn't occur.

Bug: 160862405
Test: Run on device and verify no crashes occur.
Change-Id: I6ab02072a11078f05f65b61310d5637743e258ff
parent ecb70239
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment