diff options
| author | 2020-07-09 09:35:29 -0400 | |
|---|---|---|
| committer | 2020-07-13 19:28:10 +0000 | |
| commit | fc143594820237ea10434114b451f5c5cd963fb3 (patch) | |
| tree | cf1346913e0f225430e9a803b2f337400a4a1a9d /vulkan/libvulkan/api.cpp | |
| parent | 44dfbadd4abcb10bcf7be2adcf4e541b85591dec (diff) | |
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.
Merged-In: I6ab02072a11078f05f65b61310d5637743e258ff
Change-Id: I6ab02072a11078f05f65b61310d5637743e258ff
(cherry picked from commit ec5b4b1eebd9919ec54ff2d03d17fbf387012d1d)
Diffstat (limited to 'vulkan/libvulkan/api.cpp')
0 files changed, 0 insertions, 0 deletions