• spiiroin's avatar
    [proximity] On-demand proximity sensor activation. Fixes JB#34789 MER#1562 · d9c917b7
    spiiroin authored
    MCE code has built-in assumption that proximity sensor is either not used at
    all, or it is constantly powered on. The former basically means that in-call
    proximity blanking is not available. And the latter can cause direct (the
    sensor itself) or indirect (might block suspend) power drain, or make it
    more likely for lower level sensor handling glitches to surface.
    
    Make it possible to select on-demand proximity sensor activation.
    
    When selected, proximity sensor is powered up:
    - While the device in a state where it might be needed (calls, alarms, etc).
    - When events that could lead to display wakeup are received (powerkey
      presses, doubletaps, etc).
    
    As the sensor state is not available immediately after requesting
    sensor powerup, implement on-proximity action queue which can be used
    to schedule actions to be taken when the sensor has reached a stable
    state.
    Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
    d9c917b7
mce-common.h 1.1 KB