1. 15 Mar, 2019 1 commit
    • 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
  2. 23 Jan, 2017 1 commit
    • spiiroin's avatar
      [mce] Expose battery/charging data on D-Bus. Fixes JB#37422 · afe100cb
      spiiroin authored
      Tracking battery data via statefs requires dealing with fuse and kernel
      related quirks. Since mce already deals with that, it would be preferable
      to reuse already functioning code instead of duplicating it elsewhere.
      
      Add handlers D-Bus method calls that can be used to query current values
      and send signals when state changes are detected.
      
      The following information is made available:
      - usb_cable_state: unknown | connected | disconnected
      - charging_state:  unknown | on | off
      - battery_status:  unknown | full | ok | low | empty
      - battery_level:   -1 | 0...100
      
      Related D-Bus constants are defined in mce-headers >= 1.21.0.
      Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
      
      REVIEW separate internal & dbus state processing more clearly
      afe100cb
  3. 16 Dec, 2010 1 commit