commit | 58715f8c9e279184d116cbd4df4fb43e656c1237 | [log] [tgz] |
---|---|---|
author | Darrell Shi <darrellshi@google.com> | Thu Oct 21 20:18:56 2021 +0000 |
committer | Darrell Shi <darrellshi@google.com> | Fri Oct 22 16:20:11 2021 +0000 |
tree | e53c1d0d6d4b210fb52f3c7aff5cc62ad87b8645 | |
parent | f16c37ac147ff04bb3db87d9317e4f4c1b342c7f [diff] |
Handle light sensor NullPointerException. Light sensor is not available on all devices so add a check for availability before starting the ambient light mode monitor. Test: atest AmbientLightModeMonitorTest#shouldNotRegisterForSensorUpdatesIfSensorNotAvailable Bug: 203691187 Fix: 203691187 Change-Id: I1f77f1337f24409986029bf018b6e6f43857db87