214 Commits

Author SHA1 Message Date
LuK1337
ce722bdb50 hidl: Setup touchscreen gestures with Lineage touch HIDL HAL
This takes advantage of the touchscreen gesture nodes exposed by Oplus
touchscreen drivers.

Change-Id: I5a43b8f922a8d1c940e367d22d377b7161913d3a
2022-04-17 16:12:09 +02:00
LuK1337
745a264171 livedisplay: Add (and run) clang-format file
Change-Id: Ibb4a56ef02a404717512d7a7f99bc31e2ce442a4
2022-04-17 10:25:28 +02:00
LuK1337
2ee105e951 fixup! livedisplay: Implement IAntiFlicker interface fragment
Change-Id: I8461e18c60d581f87d9fba1fbc0ec85ab14cfdff
2022-04-17 00:18:13 +02:00
Paul Keith
f677f346bc livedisplay: Fix racy init
* It turns out moving this to class main doesn't work as well
  as some had thought it would, so restore the previous logic
  to use class hal, and restart if the backend isn't up yet

Change-Id: Ib8b417d89108dcf80d0d159e8d84e5327944b2a1
2022-04-14 11:03:52 +02:00
Bruno Martins
096e9d9c20 livedisplay: Use pragma once directive everywhere
Change-Id: Ic5ec76210a7d8697945561b2d150f0c1f778dc5c
2022-04-14 11:03:52 +02:00
LuK1337
3334859f4f livedisplay: Implement IAntiFlicker interface fragment
Change-Id: I1dbc6d8989a80fe7b06d4356aeb717417997a793
2022-04-14 11:03:52 +02:00
LuK1337
85fffbdcfa livedisplay: Expose headers and implementations as Soong modules
Change-Id: I335cb98b544fceed1e0d11f0a7dd9cc38860b5aa
2022-04-14 11:03:52 +02:00
LuK1337
9e7b514023 livedisplay: Uprev to 2.1
Change-Id: I98b2ea16ed342339ee652d5cb79dcfd22f8c0a0d
2022-04-14 11:03:52 +02:00
LuK1337
21edb37c1f livedisplay: Implement ISunlightEnhancement interface
Change-Id: I728653099f9a57a85f1ce2ffa93b4e62981208fa
2022-04-14 11:03:52 +02:00
Daniel Jacob Chittoor
ada38b5fed hidl: Import LiveDisplay 2.0 HIDL HAL w/ IPictureAdjustment
Signed-off-by: Daniel Jacob Chittoor <djchittoor47@gmail.com>
Change-Id: I5065670e7dbf9baa4a69d6ec0f5e4c36d533054d
2022-04-14 11:03:51 +02:00
Bruno Martins
2c82dd85d0 powershare: Use pragma once
Change-Id: I9cfeed5e79c35139f7532c522dad0ca25ed35fe1
2022-04-14 09:27:07 +02:00
LuK1337
cfa39af4d1 hidl: Implement vendor.lineage.powershare@1.0 HAL for Oplus
Change-Id: I8022ac47411369f3ede969417fd46e08fb984e24
2022-04-14 09:27:06 +02:00
LuK1337
2aa828d7c2 KeyHandler: Remove BootCompletedReceiver
No longer needed.

Change-Id: Ib6d7388dc61b3c807710c77339a8bab0256fbaf4
2022-04-13 09:53:43 +02:00
Alexander Koskovich
6b6d45fe1f vibrator: Add missing chowns
Change-Id: Id9d1d1b0075e50c9918aebb456c7a0974163e6d6
2022-04-12 14:39:35 +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
Daniel Jacob Chittoor
60811b3df4 tri-state-key: Add support for system variants
* SDM845 family of OnePlus devices on LineageOS use a prebuilt vendor.

Change-Id: I0bbb1ac2d97e49fcc2aa5d78138ae97cf6b536b8
2022-04-11 17:55:13 +02:00
Han Wang
7c8c176fd7 tri-state-key: Add vendor. prefix to svc name
Change-Id: I616c359d7f9204be1dcb7008f4c44ceec92cd150
2022-04-11 17:55:13 +02:00
Hikari-no-Tenshi
f4b38ef0d8 tri-state-key: Add hall sensor calibration support
Change-Id: I8449041eec5c8ab4153bd2942ebc7fda9ceb743e
2022-04-11 17:55:13 +02:00
Peter Cai
ac3ec4df45 tri-state-key: Fix vibrate position for op8p
Change-Id: Id3dd97e0284d61ee093e6fd3cf0baaa20479dc14
2022-04-11 17:55:13 +02:00
LuK1337
636b838f18 tri-state-key: Add tri-state-key_daemon to uhid group
Change-Id: I8d1dcd91bd560e0abe9488e2ecfcbf548259807e
2022-04-11 17:55:13 +02:00
Luca Stefani
b865f65b71 Add tri-state-key daemon
Change-Id: I796f3853ac87df78a0d1a890c663e312a0ee2d1b
2022-04-11 17:55:13 +02:00
LuK1337
b64c8238ac vibrator: Implement Oplus effects
Change-Id: Ic0cf2ed41a7d7fe55a6b5e1ea8418583981a62b0
2022-04-11 16:27:27 +01:00
Daniel Jacob Chittoor
92f894fd2a vibrator: Rebrand for Oplus
Change-Id: Ib3530fbc0f321fe88d16921ba8c381f0f2f5e385
2022-04-11 16:27:27 +01:00
Nolen Johnson
f3fdce9afd vibrator: Drop kernel header dependency
* This is a partial revert of 5fba81168e8446448da68a5e546c2aa77b8dd148.
* CAF adds the kernel headers dep to fetch one single value that is
  removed in that commit. Easier to just carry it here, especially
  considering most devices won't have this in generated_kernel_headers,
  even.

Change-Id: I5b7daab2731e4b6b529cdb1ccf0fe173f677f8fd
2022-04-11 16:27:27 +01:00
Pig
fdfa73426a vibrator: Simplify soc check and drop prop dep
[npjohnson]: adapt to reflect 18.1 upstream merges as well as
include now required headers.

Change-Id: I8581d22deac451d0c44e4b3135d2729da2865a36
2022-04-11 16:27:27 +01:00
Jeongik Cha
41f8f88040 vibrator: Use new vibrator NDK platform
Change-Id: I191e1b942dea3a5cb38e79b8a05803a8b72acdc7
2022-04-11 16:27:24 +01:00
Daniel Jacob Chittoor
8e38bbd395 aidl: Import QTI Vibrator AIDL
* CAF tag LA.UM.9.1.r1-11600.03-SMxxx0.QSSI12.0

Change-Id: I48b8326aab719b236ff6b39c05dc4df1eeb6f688
2022-04-11 16:24:12 +01:00
LuK1337
d0e36f6d22 doze: Move sensor trigger values to resources
This lets us use android.sensor.tilt_detector on Oplus.

Change-Id: I21db794d86656bfa41dfe32d33b272d4b55ec199
2022-04-11 17:19:46 +02:00
TheScarastic
e854088f20 doze: Adapt to S style
* Reference e7db7fc560

* Adapted and rewritten in Kt

* Use Theme.SubSettingsBase for theme
* Replace PreferenceActivity with CollapsingToolbarBaseActivity
* Add Titles to preference screen
* Remove onOptionsItemSelected and where neccessary move to activity

Change-Id: I4d35ade6f45022944df4db787948c03b5bc14e5f
Signed-off-by: Rohan Hasabe <rohanhasabe8@gmail.com>
Signed-off-by: Bruno Martins <bgcngm@gmail.com>
2022-04-11 17:19:46 +02:00
Micheal
3f5b2402b6 doze: Add an exported flag in manifest
Targeting S+ (version 31 and above) requires that an explicit value
for android:exported be defined when intent filters are present

Change-Id: I12d27c23624eb5259da582b86ac1bd7572754f0c
2022-04-11 17:19:46 +02:00
Anay Wadhera
760aded5b9 doze: Drop minSdkVersion
Change-Id: Idbbe6713999ca8b942b2bf91cc899118e22a062b
2022-04-11 17:19:46 +02:00
LuK1337
25593fedb6 doze: Mark intent as nullable for onStartCommand() and onBind()
See: https://developer.android.com/reference/kotlin/android/app/Service
Change-Id: I547db2abffc40863a00c42528cd44182e0889e68
2022-04-11 17:19:46 +02:00
LuK1337
c7f76a731f doze: Java -> Kotlin + bp -> mk
Change-Id: I377658589af22c58ddbf1768f4c89d06594d2762
2022-04-11 17:19:46 +02:00
LuK1337
5d62057c70 doze: Make all features optional
This change makes all users of doze app declare supported sensors in
their device tree overlays.

Change-Id: I6444da1e8b42d0064a04981632c84f6c90ddaee7
2022-04-11 17:19:46 +02:00
LuK1337
2edf978bd0 doze: Enable proximity sensor check for raise to wake
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/3646
Change-Id: Ic546b25126e0dc44af444179f7041f6b5fe51763
2022-04-11 17:19:46 +02:00
Nauval Rizky
0d2a7ae425 doze: Introduce raise to wake gesture
* Highly inspired by iOS raise to wake

- Adapted to OnePlus sdm845 doze

doze: Add min interval for raise2wake

* avoid having early wakeup
* also fix typo in acquire timeout

doze: Enable pickup when raise to wake is toggled

- This is needed in order for raise to wake to function properly.

doze: Fix pickup status for raise to wake

Co-authored-by: AnierinB <anierinb@evolution-x.org>
Co-authored-by: AshutoshSundresh <ashutoshsundresh@gmail.com>
Co-authored-by: LuK1337 <priv.luk@gmail.com>
Signed-off-by: AnierinB <anierinb@evolution-x.org>
Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
Signed-off-by: LuK1337 <priv.luk@gmail.com>
Change-Id: I5df0c4f11f1b24ab813abc393960c5f03f5fab1f
2022-04-11 17:19:46 +02:00
arian
3887783596 doze: Add vector icons
* from https://materialdesignicons.com/ with small changes

Signed-off-by: Anunay Maheshwari <anunaym14@gmail.com>
Change-Id: Ibbb18065f97ed6f8f5376752495255aeafe1db82
2022-04-11 17:19:46 +02:00