Ensure ProxCheck doesn't unregister ProxSensor
If the ProximitySensor passed into ProximityCheck is shared with other clients, the ProximityCheck was causing the ProximitySensor to be paused which, in turn, meant other clients would miss out on events. Specifically, this manifested itself in AOD/Doze where one part of Doze wanted the proximity sensor registered, but another part used ProximityCheck with the same sensor, causing the sensor to be paused. The screen would either not turn off when covered, or would not turn back on when uncovered. This CL is a cherry pick of an earlier CL that went into rvc-d1. Some slight differences are seen since the proximity code in rvc-d1 has diverged from rvc, but the logic needed for the fix is the same. Fixes: 155365422 Test: atest SystemUITests and manual Change-Id: I3c3faf79ba6d3915b0cfecec7861f6065ae689e8 Merged-In: I3c3faf79ba6d3915b0cfecec7861f6065ae689e8
Loading
Please register or sign in to comment