Code review comment for lp:~alfonsosanchezbeato/powerd/ofono-fixes

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

254 + /* Activate proximity sensor if no previously existing call */
255 + if (g_calls == NULL)
256 + if (powerd_add_display_request(&prox_sensor_req, "prox-sensor"))
257 + powerd_warn("Request to use proximity sensor failed");

If you check the previous logic to enable/disable the proximity sensor, you'll see that it was only enabled when the call was in the active state, and not when the call was added in the ofono level. As a side effect, the proximity sensor is now enabled even before the call is active (the user accepts the call), which is a regression.

Please do a similar check, as we only want the proximity sensor to be enable when we have at least one active call in place.

review: Needs Fixing

« Back to merge proposal