Commit Graph

30 Commits

Author SHA1 Message Date
Michael Bestas
ed9abba51b Automatic translation import
Change-Id: Iebb9a21c52f633aa9c6ddd0009a88445a105b8c9
2023-02-13 16:05:21 +02:00
Michael Bestas
9fb26aae02 Automatic translation import
Change-Id: I47fb5adafce6fcfc04925503cd433eebdc4aad3f
2023-01-10 04:41:40 +02:00
Michael Bestas
5c2acd54d9 Automatic translation import
Change-Id: I57a64bdf02fd1e03b0bd709799e475eba4da4084
2022-12-16 20:57:42 +02:00
Bruno Martins
a5332c7fee KeyHandler: Fix compilation for QPR1 merge
Change-Id: Id01559565bbee715f67213c9d4c99dddac4a761c
2022-12-06 18:04:20 +00:00
Michael Bestas
d1930f19ab Automatic translation import
Change-Id: I692f213694a2de3f0b1db87b93f14041bcbaac93
2022-11-25 15:03:28 +02:00
Michael Bestas
d9929c1fdd Automatic translation import
Change-Id: I5f47631908c351b00fec9146d86cffff59e86cac
2022-11-03 01:57:23 +02:00
xchgrbprsp
559c9f3640 KeyHandler: Add 'None' alert slider mode
Change-Id: I460448a0c1dfa6a5e16ecf93e6fbab29ee2de8fd
2022-10-21 14:45:07 +02:00
LuK1337
2a1d632735 KeyHandler: Use VibrationAttributes.USAGE_HARDWARE_FEEDBACK
This fixes vibration when user disabled 'Touch feedback' in settings.

Change-Id: If465f34c86a1e8e1b0f0b2ee3cc74515315e30b4
2022-10-19 20:44:47 +02:00
LuK1337
7d9972f3f4 KeyHandler: Use property access syntax when possible
Change-Id: I270ebbd32ae7de36740171325035555507bcfc7e
2022-10-19 20:42:04 +02:00
LuK1337
feb3dae687 KeyHandler: Null assert on getSystemService()
Change-Id: Ia3e4ce22c6ebf627301efef3fd1e214b05fbfeed
2022-10-19 20:41:14 +02:00
LuK1337
14a43e3d98 KeyHandler: Simplify boolean check
getBooleanExtra() does not return `Boolean?` anymore, or ever?

Change-Id: I8a1987ee1244148dccbf434d424ea1a60f7506cf
2022-10-19 20:38:47 +02:00
LuK1337
45b4b90881 KeyHandler: Remove unused/unnecessary imports
Change-Id: I9395dca4f188894464feb3b20063c27b20855b99
2022-10-19 20:38:16 +02:00
Michael Bestas
1e29f6f777 Automatic translation import
Change-Id: If4cb20654710903d59600cada3fd8bcd281cd77c
2022-10-05 19:31:05 +03:00
LuK1337
7b1294c8b5 KeyHandler: Don't ignore oplus,tri-state-key
As seen on SM8150.

Change-Id: Ie70a075926f51fa80b2dc148859823d705fb757d
2022-10-03 21:21:39 +02:00
LuK1337
6c0ac8d4ca KeyHandler: Wait for zen mode change before setting ringer mode
This makes sure that asynchronous zen mode change does not override our
ringer mode setting.

Change-Id: I8d381d36759108daa3d977d4b78ae438a95f4962
2022-09-10 16:44:34 +02:00
LuK1337
2aa828d7c2 KeyHandler: Remove BootCompletedReceiver
No longer needed.

Change-Id: Ib6d7388dc61b3c807710c77339a8bab0256fbaf4
2022-04-13 09:53:43 +02:00
LuK1337
99f10d3d04 KeyHandler: Adjust for Oplus
Change-Id: Icc5e6583f48756fc765970c9e7a0f27425f37105
2022-04-11 18:17:39 +02:00
Bruno Martins
a446bb68c6 KeyHandler: Update to S
Change-Id: I68c6c0bc4d02f515a75293150e45b5bb083b0b26
2022-04-11 17:55:13 +02:00
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