Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit a9f3e5c7 authored by Bruno Martins's avatar Bruno Martins Committed by Michael Bestas
Browse files

PowerManager: Add proximity check on wake

This is a squash of the following commits, forward-ported to Oreo
and adapted to the Lineage SDK:

Author: Danesh M <daneshm90@gmail.com>
Date:   Wed Jun 25 21:31:49 2014 -0700

    ProximityWake : Add support for checking proximity when waking device

    Change-Id: Ia5ff446d88435773acccc7467e66009000dc20cb

Author: Schubi <schubi@erlangen.ccc.de>
Date:   Tue Jul 29 02:10:16 2014 +0200

    Be sure to shutdown the proximity sensor after display wake

    This fixes:
    http://review.cyanogenmod.org/#/c/66657/



    Change-Id: I1768f13cb48c3e056d0e137642690fc3d650c4ab

Author: Danesh M <daneshm90@gmail.com>
Date:   Mon Aug 4 20:18:18 2014 -0700

    PowerManager : Make proximity check opt-in

    Change-Id: I7cf64a82530da2e655018e43683ba7a5584d54f8

Author: Danesh M <daneshm90@gmail.com>
Date:   Fri Jul 25 19:02:26 2014 -0700

    Framework : Fix proximity wakeup reference

    Change-Id: Ia40ca6fbf6e37fbb3996f2384f725c30b88c2131

Author: dankoman <dankoman30@gmail.com>
Date:   Thu Feb 5 15:12:13 2015 +0100

    [1/2] Frameworks: let InCallUI handle proximity sensor for incoming calls

    Fixes "while 'prevent accidental wake-up' is on, proximity sensor
    doesn't control screen state on incoming call. Must manually
    turn on screen to see who's calling."

    Change-Id: I738b3bbd328992c8a8010a0c8d9aa1e444cfa9f9

Author: Steve Kondik <steve@cyngn.com>
Date:   Thu May 21 13:10:54 2015 -0700

    power: Fix locking for wakeup proximity check

     * Often I'm noticing high power consumption due to the proximity sensor
       never turning off. Add synchronization around this code to ensure
       ordering.

    Change-Id: I8ccf3152166cd896e0ce2551c01b8ac8f501d782

Author: Scott Mertz <scott@cyngn.com>
Date:   Fri Aug 21 13:47:51 2015 -0700

    add config for proximity check on screen on default value

    Change-Id: I7e6ae08e23ee147a37986aa6aa9b3176b301a09e

Author: Danesh M <daneshm90@gmail.com>
Date:   Mon Aug 4 18:09:06 2014 -0700

    Services : Ensure proximity check is taken into consideration

    Only do the proximity check if explicitly being asked to do so.
    This is a patch that was never ported from cm-11.0 :
    2293e60c

    issue-id: CYNGNOS-1223

    Change-Id: Id1be619e638de6a45252d8390eab6e38bd5de5a7

Author: Erica Chang <echang@cyngn.com>
Date:   Tue Jun 9 15:01:12 2015 -0700

    services: button brightness should check proximity

    Change-Id: I10a72fa6d8b520e86cfef3d7ded489fd7fa936d2

Author: Steve Kondik <steve@cyngn.com>
Date:   Mon Oct 26 03:07:26 2015 -0700

    powermanager: Initialize SensorManager in systemReady()

     * Service startup ordering is different on M and the sensor service
       is not ready during construction of the PowerManager. This was
       causing a hang on boot. Move it to systemReady instead.

    Change-Id: I9e0293484e1aaaf9f82f9c75680bec558607c54d

Author: Adnan Begovic <adnan@cyngn.com>
Date:   Mon Nov 9 17:59:13 2015 -0800

    fw: Move proximitycheck to CMSettings.

    Change-Id: Ie80166c990363d3846925b189a1f7001a7fd56f8

Author: Pat Erley <perley@cyngn.com>
Date:   Thu Dec 10 17:00:53 2015 -0800

    PowerManagerService: Log when proximity blocks wake

    There is currently no indication when the proximity sensor
    is allowed to prevent the system from waking up.  This can
    make it hard to debug weird failed wakes.  Add a log to
    facilitate debugging wakup problems.

    Change-Id: I7df34e13b1268a4e7211fb06ccd88f2053c0af0a

Author: Christopher R. Palmer <crpalmer@gmail.com>
Date:   Fri Feb 19 11:53:15 2016 -0500

    base: Fix proximity check on power key

    To test, enable "Settings >> Display >> Prevent accidental wakeup",
    hold your hand over the proximity sensor and turn your phone on.

    Prior to this change, it will wake up the phone and after the change
    it will not.

    Change-Id: Ied300108cebb31dedf228e85510abebb3e8a4152

Author: vm03 <vasy@vasy.ru>
Date:   Sat Feb 27 17:16:02 2016 +0300

    base: Fix proximity check on non power key

    To test, enable "Settings >> Display >> Prevent accidental wake-up"
    and "Settings >> Buttons >> Home button Wake up device", hold your
    hand over the proximity sensor and turn your phone on by home key.

    Prior to this change, it will wake up the phone and after the change it will not.

    Change-Id: Ifd14ff2ad9cd2cbc64209b9cf19e3c0ee0b6f40f

Author: Roman Birg <roman@cyngn.com>
Date:   Tue Apr 26 16:39:47 2016 -0700

    only use proximity checks on wakeup keys

    The power button should always wake the screen regardless of the
    proximity; only check proximity when the wake up key code is WAKEUP.

    Ticket: CYNGNOS-2579

    Change-Id: I686ad22d513a3d939be3a0a5c3b752339b2383d3
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

Author: LuK1337 <priv.luk@gmail.com>
Date:   Sat May 21 11:48:13 2016 +0200

    Disable proximity check on power key properly

    Change-Id: If1ca0fa02805ce2fbe5a9ac1ab56a5e62beca4e1

Author: Han Wang <416810799@qq.com>
Date:   Tue May 5 05:45:43 2020 +0200

    PowerManager: Move custom API definition to end of AIDL

     * Corrects IPowerManager.h transaction IDs that are currently
       out sequence. As a bonus, we don't need to update IPowerManager.h
       anymore when adding our own methods.

    Change-Id: Ifb84f999909317bd8281c896a68a8565173392c6

Change-Id: Ia5ff446d88435773acccc7467e66009000dc20cb
parent b7945c6a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment