Prevent NPE in ProximitySensor.
There was a pseudo-race in ProximitySensor where, if a listener
tried to cancel its proximity sensor, the sensor would then add
a delayed runnable _after_ being canceled, causing it to NPE the
next time it ran. This only occured on phones using a dual-sensor
approach to proximity. It happened particularly regularly with the
ProxCheck utility class.
Fixes: 155183913
Test: atest SystemUITests && manual.
Change-Id: Id399c6d577e3c43f91a3d3a2e3b49fd4fa1918e4
2 files changed