Commit Graph

12 Commits

Author SHA1 Message Date
LuK1337
10b1f49ea2 KeyHandler: Drop dependency on org.lineageos.platform.internal
Unused.

Change-Id: I4bf43009fb559dc4a5e684fc7492ef5f16b9bb0a
2022-04-11 17:55:13 +02:00
Timi Rautamäki
75ea79851b KeyHandler: Integrate in tri-state-key handling via UEventObserver API
This basically adds required code to support both switch and extcon
based tri-state-key. This also adds tri-state-key-calibrate script for
devices that need to be calibrated on boot (OnePlus7+)

Change-Id: I2e6c5d2861569750bead05edacf6e328a5227077
2022-04-11 17:55:13 +02:00
Timi Rautamäki
acbbb33e8f KeyHandler: Add more modes
* Add DND modes
 * alarms only
 * important interruptions
 * total silence

* Add option to mute media when going to silent mode

Change-Id: Ia59e06f0a0dd3047b3771bb3ac8d5e338d0a75c3
2022-04-11 17:55:13 +02:00
Timi Rautamäki
a9f61a216e KeyHandler: Add customization options
Change-Id: I5f50f5d442342b2082bf47e11b1351e578fa0144
2022-04-11 17:55:13 +02:00
LuK1337
94f6a33159 KeyHandler: Java -> Kotlin
Change-Id: Ia39b3055315cecdf32722c0361f29c042e06a81c
2022-04-11 17:55:13 +02:00
Daniel Jacob Chittoor
49274e4aba KeyHandler: Switch to blueprint
Signed-off-by: Daniel Jacob Chittoor <djchittoor47@gmail.com>
Change-Id: I7dc50b822bcb7bd0f95193bd96494ec879bd9017
2022-04-11 17:55:13 +02:00
LuK1337
aab3802588 KeyHandler: Use HEAVY_CLICK for MODE_NORMAL_EFFECT
Now that we support OOS style haptics, regular 250ms vibration
feels kinda out of place here.

Change-Id: I392df4c75bbef3f7e3ad1f3cf7f0e1c2bbf447ee
2022-04-11 17:55:13 +02:00
LuK1337
d87417d935 KeyHandler: Do nothing when action != ACTION_DOWN
This makes sure we only change the ringer mode / play haptics once.

Change-Id: Ie5a6050338cee75cd8fe6da6edfae03141263033
2022-04-11 17:55:13 +02:00
LuK1337
645327fe29 KeyHandler: Use mode specific vibration effects
NOTE: This change depends on following SystemUI change:
- https://review.lineageos.org/c/305900
- https://android-review.googlesource.com/c/1648967

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/3019
Change-Id: Ifc16a469311c4dd7ce9ef8633ab66546ef4e6ede
2022-04-11 17:55:13 +02:00
Ashwin R C
9426932d60 KeyHandler: Use VibrationEffect
* Also update haptic feedback logic

Change-Id: I722022d014d9e88ef267a5563b43fee87ef02b6b
2022-04-11 17:55:13 +02:00
Anton Hansson
05bd29192f KeyHandler: Set LOCAL_PRIVATE_PLATFORM_APIS
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Bug: 73535841
Change-Id: Iabb0556dc1c80c7fc7f6c76d61d5e441b03cdce0
2022-04-11 17:55:13 +02:00
Luca Stefani
39cb612e84 Add a KeyHandler for tri-state-key events
Change-Id: I22a7ee5b7eec5667b14f1a587a6d0138e77dc0f3
2022-04-11 17:55:13 +02:00