GitHub/LineageOS/android_hardware_samsung.git
2 years agoAutomatic translation import
Michael Bestas [Wed, 2 Nov 2022 23:57:26 +0000 (01:57 +0200)]
Automatic translation import

Change-Id: I1c5ec32ac4c59001458242ff88f053b50f08b4a2

2 years agoaidl: memtrack: Rebrand to samsung and merge into one module
Tim Zimmermann [Fri, 9 Sep 2022 13:17:16 +0000 (15:17 +0200)]
aidl: memtrack: Rebrand to samsung and merge into one module

Change-Id: I0859a832d4b47f704b2799d5f4004c32901a15eb

2 years agoaidl: Import gs101 memtrack HAL
Tim Zimmermann [Fri, 9 Sep 2022 13:12:08 +0000 (15:12 +0200)]
aidl: Import gs101 memtrack HAL

From hardware/google/graphics/common @ android-13.0.0_r4

Needs:
https://github.com/torvalds/linux/commit/aa30f47cf666111f6bbfd15f290a27e8a7b9d854
https://android.googlesource.com/kernel/google-modules/gpu/+/ced6904b8892e23333566105d5266515532a9c2c
https://android.googlesource.com/kernel/google-modules/gpu/+/620019f26cee4f69c33fc0861a7975f50b7ce8b3

Change-Id: I46ebd21033b7b387503adc835a5d6057bc7c8779

2 years agoaidl: health: Initial AIDL implementation
Tim Zimmermann [Fri, 26 Aug 2022 12:29:14 +0000 (14:29 +0200)]
aidl: health: Initial AIDL implementation

* Granted correct permissions on fb0 by default
* Enabled suspend according to
  https://android.googlesource.com/platform/hardware/interfaces/+/refs/tags/android-13.0.0_r3/health/aidl#charger-enable-suspend

Change-Id: I41b84840a03a57d46beb1a7520182de2bb29d2f5

2 years agoaidl: usb: Support contaminant presence detection
Tim Zimmermann [Thu, 25 Aug 2022 12:26:52 +0000 (14:26 +0200)]
aidl: usb: Support contaminant presence detection

Change-Id: Ia2e704874a8ed336f97ca756b0ea26cdc40aa5d3

2 years agoaidl: usb: Support enableUsbData()
Tim Zimmermann [Thu, 25 Aug 2022 09:47:40 +0000 (11:47 +0200)]
aidl: usb: Support enableUsbData()

Change-Id: I369731be320b708e63c92bae08f563607d6a8512

2 years agoaidl: usb: Rebrand to samsung
Tim Zimmermann [Thu, 25 Aug 2022 09:39:48 +0000 (11:39 +0200)]
aidl: usb: Rebrand to samsung

Change-Id: I61e228d7d7958c5078e8186700b8cc14804154c9

2 years agoaidl: usb: Import default implementation
Tim Zimmermann [Thu, 25 Aug 2022 09:37:52 +0000 (11:37 +0200)]
aidl: usb: Import default implementation

* From hardware/interfaces @ android-13.0.0_r3

Change-Id: I4ac9478286577a7ea5150b007d7e34c26e22ca38

2 years agosamsung: Remove hidl USB HAL
Tim Zimmermann [Thu, 25 Aug 2022 09:21:32 +0000 (11:21 +0200)]
samsung: Remove hidl USB HAL

* We're going to replace it with AIDL

Change-Id: I522a2649ff2f40c4f8a73df010c81fe4464ff58e

2 years agosamsung: sensors: 2.1: Convert to AIDL implementation
Tim Zimmermann [Thu, 25 Aug 2022 05:37:51 +0000 (07:37 +0200)]
samsung: sensors: 2.1: Convert to AIDL implementation

* android.hardware.sensors@aidl-multihal sources taken from hardware/interfaces @ android-13.0.0_r3

Change-Id: Ifec53372d142dcaf3f2111431ee2b3c2674744f2

2 years agoAutomatic translation import
Michael Bestas [Wed, 5 Oct 2022 16:31:07 +0000 (19:31 +0300)]
Automatic translation import

Change-Id: Ia4c7bdfc8ed22f486040dbb355e0218f984435b1

2 years agodoze: Include SettingsLib in static libraries
Tim Zimmermann [Tue, 23 Aug 2022 14:57:23 +0000 (16:57 +0200)]
doze: Include SettingsLib in static libraries

* And remove now redundant dependencies

Change-Id: Id5e790c6de0565592357d2fef11639d0b1533f14

2 years agodap: Improve strings
Michael Bestas [Sun, 2 Oct 2022 22:32:26 +0000 (01:32 +0300)]
dap: Improve strings

Change-Id: I561cdd15f256615787aac6391c194dfc17c8ccd8

2 years agoaidl: Remove ndk_platform backend. Use the ndk backend.
Jiyong Park [Mon, 9 Aug 2021 00:01:16 +0000 (09:01 +0900)]
aidl: Remove ndk_platform backend. Use the ndk backend.

The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.

Bug: 161456198
Test: m
Merged-In: I14a1c57bd06f1f2aa52491f779c7030d4de03547
Change-Id: I7b9055909b901843631314b9577a9e578a739d00

2 years agoaudio: turn props into vendor props
ivanmeler [Mon, 6 Jun 2022 12:27:25 +0000 (14:27 +0200)]
audio: turn props into vendor props

d88d29a4384a27366fe47e40c977a65e43566159 moved audio hal to vendor
but props audio hal is reading can't be used as vendor props so turn them into vendor props
in case some treble compatible device ends up using this hal and can't cross read props

Change-Id: I439b07011b681af05cbfaa4b7d88ae337751a6ff

2 years agohidl: usb: Correct supportedModes
Tim Zimmermann [Mon, 9 May 2022 18:07:05 +0000 (20:07 +0200)]
hidl: usb: Correct supportedModes

* DRP is not supported, switch back to what we had with our old 1.1-typec HAL
* Restores support for external display

Change-Id: I0792a629bb082ceb95582bc28447d7cdea757f2e

2 years agofingerprint: allow to request force calibration
Jesse Chan [Sat, 15 Aug 2020 07:41:24 +0000 (15:41 +0800)]
fingerprint: allow to request force calibration

* Helps with the now rare enrollment calibration errors we get
  and also with fingerprint enrollment after enrolling a fingerprint
  in DSU (without this it constantly fails with calibration error after that)

[Linux4: Pass 1 as parameter and unconditionally call it]

Change-Id: Idde4a4b06efc279d227ab2e3b4056ed8855dbf8f

2 years agoaudio: add LOCAL_VENDOR_MODULE
Francescodario Cuzzocrea [Fri, 7 Jan 2022 14:26:12 +0000 (15:26 +0100)]
audio: add LOCAL_VENDOR_MODULE

Signed-off-by: Francescodario Cuzzocrea <bosconovic@gmail.com>
Change-Id: I666ca46a52816037adbf773b423971b17d64916b

2 years agoaudio: remove AUDIO_DEVICE_OUT_ALL_SCO from switch case
ivanmeler [Thu, 7 Oct 2021 10:44:25 +0000 (10:44 +0000)]
audio: remove AUDIO_DEVICE_OUT_ALL_SCO from switch case

Fixes this error
hardware/samsung/audio/voice.c:346:14:
error: case value not in enumerated type 'audio_devices_t'
[-Werror,-Wswitch]
        case AUDIO_DEVICE_OUT_ALL_SCO:

Signed-off-by: Francescodario Cuzzocrea <bosconovic@gmail.com>
Change-Id: I4902b463acf15994ccb9d5a0a4968ac81fc0905c

2 years agohidl: sensors: add hover proximity sensor support
A2L5E0X1 [Tue, 5 Apr 2022 18:28:47 +0000 (18:28 +0000)]
hidl: sensors: add hover proximity sensor support

* used by Exynos 850 devices
* requires a kernel patch in touchscreen driver to invert reported proximity values,
  see https://github.com/exynos850-dev/android_kernel_samsung_exynos850/commit/d7ab9befc31ae0e5f7b1a82eddd0c8f8a2d11b20

Change-Id: I3d5d7de2f6ef7877490fa36968a4c07e0ac1e40e

2 years agohidl: sensors: add input group to init.rc
A2L5E0X1 [Sun, 3 Apr 2022 11:19:46 +0000 (11:19 +0000)]
hidl: sensors: add input group to init.rc

* this is needed by Exynos850 devices to get some sensors working.

Change-Id: I84b1182f1a589592e9c0bf99ed0efd80d960bdf2

2 years agoaidl: vibrator: Don't allow intensity 0
Tim Zimmermann [Fri, 15 Apr 2022 08:04:25 +0000 (10:04 +0200)]
aidl: vibrator: Don't allow intensity 0

* Even if amplitude is > 0 resulting intensity might be 0 sometimes
* New devices just return EINVAL in kernel and ignore it, but on older
  ones this may result in very weak vibration

Change-Id: I5d290d60d8414ca747dce4af847f190e3caedbe0

2 years agosamsung: doze: add standard pickup sensor support
Michael Bestas [Mon, 20 Jul 2020 20:16:26 +0000 (23:16 +0300)]
samsung: doze: add standard pickup sensor support

fcuzzocrea:

  * adapt original change to be suitable for SamsungDoze

Change-Id: Ie2572fec6d4307ce0b555f6ee4dbf92c9cf7bd87

2 years agohidl: usb: Add missing moisture detection uevent
Tim Zimmermann [Sun, 3 Apr 2022 04:11:53 +0000 (06:11 +0200)]
hidl: usb: Add missing moisture detection uevent

* CCIC=DRY is used if there's no more moisture detected

Change-Id: I48f2e34c027bb5967dade435f6e7840ad05c71c2

2 years agoaidl: vibrator: properly implement effects
Tim Zimmermann [Mon, 31 Jan 2022 11:01:42 +0000 (12:01 +0100)]
aidl: vibrator: properly implement effects

Change-Id: I947c99d05b7227839089cfd5fc5e337033b8e5ba

2 years agohidl: usb: Rebrand to samsung and adjust paths
Tim Zimmermann [Sat, 12 Feb 2022 19:59:15 +0000 (20:59 +0100)]
hidl: usb: Rebrand to samsung and adjust paths

Change-Id: I7e9342bcea0577f24414f35f24c5f8e6758a36b9

2 years agohidl: usb: Remove overheat reporting
Tim Zimmermann [Sat, 12 Feb 2022 19:40:06 +0000 (20:40 +0100)]
hidl: usb: Remove overheat reporting

* Not supported

Change-Id: I6b6b6a1fd00a1e28a3b00cd721d885552a9bb865

2 years agohidl: usb: Remove UsbGadget HAL
Tim Zimmermann [Sat, 12 Feb 2022 19:31:06 +0000 (20:31 +0100)]
hidl: usb: Remove UsbGadget HAL

Change-Id: Iacb4b0119ad78b6d1b415831cc328018e103d93f

2 years agohidl: usb: Import gs101 USB HAL
Tim Zimmermann [Sat, 12 Feb 2022 19:22:42 +0000 (20:22 +0100)]
hidl: usb: Import gs101 USB HAL

* From device/google/gs101 @ android-12.0.0_r29

Change-Id: I76009358c627e2f4104cb96fda52557229397cc1

2 years agoSamsungDAP: Clamp DolbyCore.getProfile()'s returned value
Tim Zimmermann [Sat, 26 Mar 2022 07:03:35 +0000 (08:03 +0100)]
SamsungDAP: Clamp DolbyCore.getProfile()'s returned value

When dolby was never enabled before this would return -1 resulting in a
crash when adding the QS Tile.

Change-Id: I9ce49309aa54f4e954bd3917bfc737811a152a55

2 years agoSamsungDAP: Add QS subtitle with profile name
LuK1337 [Wed, 16 Mar 2022 22:18:44 +0000 (23:18 +0100)]
SamsungDAP: Add QS subtitle with profile name

Change-Id: I368c519ab2a76a4f4a3ba267c3f36a04f4690464

2 years agoSamsungDAP: Declare ACTION_QS_TILE_PREFERENCES intent filter
LuK1337 [Wed, 16 Mar 2022 21:54:06 +0000 (22:54 +0100)]
SamsungDAP: Declare ACTION_QS_TILE_PREFERENCES intent filter

This lets us long press QS tile to open DAP settings.

Change-Id: Id634a2d0605735c7a689fffd335c5a7782dab51f

2 years agoSamsungDAP: Make audioEffect variable nullable
LuK1337 [Wed, 16 Mar 2022 21:39:07 +0000 (22:39 +0100)]
SamsungDAP: Make audioEffect variable nullable

Prevents us from crashing hard in case one decided to boot up without
swdap in audio_effects.xml.

Change-Id: I38f4e2e9a17188feebd3821e25c751d8f17c8dca

2 years agoSamsungDAP: Add a basic search indexables provider lineage-19.0
LuK1337 [Sat, 12 Mar 2022 16:37:01 +0000 (16:37 +0000)]
SamsungDAP: Add a basic search indexables provider

Change-Id: Ibab1cb6e0b3803afc95452fa36a991103fc557ab

2 years agoImplement SamsungDap
roynatech2544 [Mon, 15 Nov 2021 13:10:49 +0000 (22:10 +0900)]
Implement SamsungDap

Co-authored-by: LuK1337 <priv.luk@gmail.com>
Co-authored-by: Bruno Martins <bgcngm@gmail.com>
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
Change-Id: I7f52714bdf7d94c9fb1c2d645839d54fd09d6bbe

2 years agoAdvancedDisplay: Add exported flags in manifest
Michael Bestas [Mon, 11 Oct 2021 15:20:51 +0000 (18:20 +0300)]
AdvancedDisplay: Add exported flags 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: I2ce2b2cd1dcd69e343ae8577587483b19d825fdc

2 years agoAdvancedDisplay: Adapt to S style
TheScarastic [Wed, 6 Oct 2021 07:25:13 +0000 (07:25 +0000)]
AdvancedDisplay: Adapt to S style

 * Use Theme.SubSettingsBase for theme

Original Change-Id: Ic879ce61d83a33da12829008a4336c8a23230d63
Change-Id: Ib16512c898f7419cd40ab71985945dc5636c26de

Change-Id: I603bde2d7e3f6d3a1fbae37ca0300100917fa7be
Signed-off-by: Francescodario Cuzzocrea <bosconovic@gmail.com>
2 years agofingerprint: Revert "fpc: keep fpc in system-background"
Jake Weinstein [Wed, 13 Jan 2021 05:16:22 +0000 (06:16 +0100)]
fingerprint: Revert "fpc: keep fpc in system-background"

While Google found that fingerprint HAL is insensitive to
increased CPU throughput, we have not found that to be the
case. Allowing more CPUs makes fingerprint unlock up to
2x faster in some tests.

SM8250 device with fingerprint on display:
- Before: 3128ms
- After: 944ms

SDM845 device with fingerprint on the power button:
- Before: 1146ms
- After: 688ms

This reverts commit d0fdb4431d26e4f257b8867f67ffd9b4a9818d9e.

Change-Id: I7a28d82caee2b8503b974a8226b29240eb072ceb

2 years agomkbootimg: Update for S
SamarV-121 [Fri, 15 Oct 2021 08:06:19 +0000 (13:36 +0530)]
mkbootimg: Update for S

 * handling of kernel bootimg arg has been changed as of https://android-review.googlesource.com/c/platform/build/+/1394339

Change-Id: Iba9d3e31621cffdeec9233fd90526baf89ded3e7
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
2 years agohidl: touch: Use pragma once
Bruno Martins [Thu, 13 Jan 2022 20:48:25 +0000 (20:48 +0000)]
hidl: touch: Use pragma once

Change-Id: Ib2567a21f0a31e88db6015e3504f78153ece7668

2 years agohidl: thermal: Use pragma once
Bruno Martins [Thu, 13 Jan 2022 20:46:52 +0000 (20:46 +0000)]
hidl: thermal: Use pragma once

Change-Id: I1fe3e3dc93fc1e16c37699582a26c362ce095ac0

2 years agohidl: powershare: Use pragma once
Bruno Martins [Thu, 13 Jan 2022 20:44:10 +0000 (20:44 +0000)]
hidl: powershare: Use pragma once

Change-Id: I9cfeed5e79c35139f7532c522dad0ca25ed35fe1

2 years agohidl: consumerir: Use pragma once
Bruno Martins [Thu, 13 Jan 2022 20:39:06 +0000 (20:39 +0000)]
hidl: consumerir: Use pragma once

Change-Id: I9925eb253d8f1385b8e82e92e2205faa1d83c7d8

2 years agohidl: fingerprint: Use pragma once
Bruno Martins [Thu, 13 Jan 2022 20:40:41 +0000 (20:40 +0000)]
hidl: fingerprint: Use pragma once

Change-Id: Id3d0a28a94f52a8f9d2c72fe41e633761557951f

2 years agohidl: livedisplay: Use pragma once directive everywhere
Bruno Martins [Thu, 13 Jan 2022 20:43:09 +0000 (20:43 +0000)]
hidl: livedisplay: Use pragma once directive everywhere

Change-Id: Ic5ec76210a7d8697945561b2d150f0c1f778dc5c

2 years agodoze: Adapt to S style
TheScarastic [Wed, 6 Oct 2021 07:25:13 +0000 (07:25 +0000)]
doze: Adapt to S style

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

Change-Id: Ic879ce61d83a33da12829008a4336c8a23230d63
Signed-off-by: SamarV-121 <samarvispute121@pm.me>
Signed-off-by: Bruno Martins <bgcngm@gmail.com>
2 years agohidl: fastcharge: Use pragma once
Bruno Martins [Thu, 13 Jan 2022 20:37:05 +0000 (20:37 +0000)]
hidl: fastcharge: Use pragma once

Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72

2 years agosamsung: Remove call to unexisting makefile
Bruno Martins [Thu, 13 Jan 2022 20:56:37 +0000 (20:56 +0000)]
samsung: Remove call to unexisting makefile

This got removed in commit 211de19.

Change-Id: I239bb58f981cfb9d74b08650c8b6986f815189f7

2 years agoaidl: light: Use pragma once
Bruno Martins [Thu, 13 Jan 2022 20:04:02 +0000 (20:04 +0000)]
aidl: light: Use pragma once

Change-Id: I517d22da79659803c1271f79cb089710efbeba2f

2 years agoaidl: Remove unused makefile
Bruno Martins [Thu, 13 Jan 2022 20:00:26 +0000 (20:00 +0000)]
aidl: Remove unused makefile

Change-Id: I19514a76be9d0f415cbbdca289a47324c765dc61

2 years agosamsung: add secril_config_svc
Tim Zimmermann [Sat, 4 Dec 2021 05:40:16 +0000 (06:40 +0100)]
samsung: add secril_config_svc

* Used for loading multisim related props from EFS

Change-Id: I9db6244cf3396eee8c13a5a58941c35a33fca412

2 years agofingerprint: implement gestures
Tim Zimmermann [Mon, 29 Nov 2021 19:51:07 +0000 (20:51 +0100)]
fingerprint: implement gestures

Change-Id: I66dfe09e569fcaea295649cce69350f4d4003eb4

2 years agofingerprint: implement ss_fingerprint_request
Jesse Chan [Mon, 29 Jun 2020 16:46:14 +0000 (00:46 +0800)]
fingerprint: implement ss_fingerprint_request

Change-Id: I8f2936a48a318889b4e5d66fe21ca93e7c4c4a5c
Signed-off-by: Jesse Chan <jc@lineageos.org>
2 years agoaidl: vibrator: improve amplitude values
Tim Zimmermann [Tue, 23 Nov 2021 20:50:14 +0000 (21:50 +0100)]
aidl: vibrator: improve amplitude values

Change-Id: Ic1c08841e00a927c138663880f4e6361e59453bd

2 years agosamsung: vibrator: convert to AIDL implementation
Tim Zimmermann [Tue, 23 Nov 2021 19:45:19 +0000 (20:45 +0100)]
samsung: vibrator: convert to AIDL implementation

Change-Id: I785178a05d323a02b557cdd6fc22db49eb952df0

2 years agosamsung: light: convert to AIDL implementation
Tim Zimmermann [Wed, 24 Nov 2021 16:27:06 +0000 (17:27 +0100)]
samsung: light: convert to AIDL implementation

Change-Id: Id3860ca6e84ea77766322cbd43239e9cebecbc73

2 years agohidl: fingerprint: Uprev to 2.3
TheScarastic [Sat, 30 Oct 2021 06:30:42 +0000 (08:30 +0200)]
hidl: fingerprint: Uprev to 2.3

 * Move fingerprint HIDL to 2.3
 * Remove Lineage FOD HIDL

[Linux4: Autodetect if fingerprint is udfps]

Change-Id: I8c628d2ee9158b45eeb04dd324b56ef3697296b7

2 years ago[thermal] Use new jsoncpp API
Haibo Huang [Thu, 25 Feb 2021 19:10:04 +0000 (11:10 -0800)]
[thermal] Use new jsoncpp API

Reader / StyledWriter are deprecated upstream

Bug: 170642246
Change-Id: Ib46040b61ed2701ea4881a0c0a306685a15b51a4

2 years agoaidl: power: Remove Lineage perf profiles remnants
Michael Benedict [Thu, 13 Jan 2022 18:09:21 +0000 (01:09 +0700)]
aidl: power: Remove Lineage perf profiles remnants

Change-Id: Id57c582c1d3619d1231890f5a20f1c899a6a6a67

2 years agoSpecify version for aidl_interface explicitly
Jeongik Cha [Mon, 15 Feb 2021 08:48:31 +0000 (17:48 +0900)]
Specify version for aidl_interface explicitly

Bug: 150578172
Test: m
Change-Id: I9714cd4416fe0ce23e57cd7db162bfb45b0f84d5

2 years agopower: add a property for config file
Wei Wang [Fri, 13 Nov 2020 18:59:00 +0000 (10:59 -0800)]
power: add a property for config file

Test: build
Bug: 173222103
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I14e7e0aa349e446f6889cbfc9a914f5314438e6b

2 years agoaidl: power: Drop Lineage perf profiles support
Bruno Martins [Thu, 13 Jan 2022 15:22:48 +0000 (15:22 +0000)]
aidl: power: Drop Lineage perf profiles support

Change-Id: Iea27471971d679733b688794dbbe1edcb86746e0

2 years agoPower: advertise power headers are deprecated
Wei Wang [Thu, 22 Oct 2020 23:21:39 +0000 (16:21 -0700)]
Power: advertise power headers are deprecated

Test: Build
Bug: 169065024
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I3cef3aff4bb2394571a3de13e535283722c308ed

2 years agoPower: add support for devices without display idle signals
Wei Wang [Wed, 21 Oct 2020 19:15:30 +0000 (12:15 -0700)]
Power: add support for devices without display idle signals

To workaround b/141025174, adding support for devices without display
idle signals. Also added a property to override idle display function.

Besides the idle signal support, this CL also makes touch boost duration
tunable through several new vendor properties. It also named display
idle monitor thread and cleans out the obsolete HIDL Power HAL
implementation.

Bug: 168080943
Bug: 169065024
Bug: 171494137
Test: Boot and trace
Change-Id: I76067d10958654d539624ec4cac8f346103e67bc

2 years agoRevert "power-libperfmgr: simply wait if idle state node is not present"
Arian [Wed, 13 Oct 2021 10:44:09 +0000 (12:44 +0200)]
Revert "power-libperfmgr: simply wait if idle state node is not present"

This reverts commit 297888275a44b3ce0e75fb1b50bea5108fc67459.

Change-Id: Iefee44a1f407729e76cb693832bad4998141c42b

2 years agohidl: power: Kill legacy and libperfmgr power implementations
LuK1337 [Sat, 16 Oct 2021 23:21:51 +0000 (01:21 +0200)]
hidl: power: Kill legacy and libperfmgr power implementations

Everyone must switch to aidl now.

Change-Id: I9e812bf3f13dcdf40650c23dee3d5f33ad8fc79d

3 years agohidl: LiveDisplay: init: correct config mkdir location for system builds
synt4x93 [Sat, 18 Sep 2021 15:59:36 +0000 (16:59 +0100)]
hidl: LiveDisplay: init: correct config mkdir location for system builds

Change-Id: Id46c6b142bbb09943ba61f1cf9421c84c7bf51e6

3 years agohidl: LiveDisplay: DisplayModes: support system builds
synt4x93 [Thu, 16 Sep 2021 23:05:52 +0000 (00:05 +0100)]
hidl: LiveDisplay: DisplayModes: support system builds

Change-Id: I795714efeac1770671ff690fac90cde147b26394

3 years agolibril: initialise RIL_CallForwardInfo to 0 when requesting status
Danny Wood [Fri, 10 Sep 2021 14:15:05 +0000 (15:15 +0100)]
libril: initialise RIL_CallForwardInfo to 0 when requesting status

Some devices have extra pointers in this structure that if non-zero
causes libsec-ril.so to segfault

Change-Id: I9fd07a4747ef0fb1388ebbec472f2dda8dea4003

3 years agotouch: Move device specfic defines to a header
ShevT [Thu, 5 Aug 2021 10:30:59 +0000 (13:30 +0300)]
touch: Move device specfic defines to a header

Change-Id: I81dcbea5393cf3426357e659f89ede050cf567fb

3 years agoaidl: power-libperfmgr: Make powerhint.json.template pass tests
LuK1337 [Tue, 25 May 2021 23:21:00 +0000 (01:21 +0200)]
aidl: power-libperfmgr: Make powerhint.json.template pass tests

Test: ./perfmgr_config_verifier -c powerhint.json.template
Change-Id: Ib137b46257cd84687a8ded0cf94424b6c353943e

3 years agosamsung: fastcharge: chown sysfs node on init
Jan Altensen [Tue, 4 May 2021 00:24:03 +0000 (02:24 +0200)]
samsung: fastcharge: chown sysfs node on init

Change-Id: I04d04b89534293cda68fe2499b9dca4fe962c804

3 years agosamsung: add nfc to gitignore
Jan Altensen [Sat, 24 Apr 2021 17:13:21 +0000 (19:13 +0200)]
samsung: add nfc to gitignore

Change-Id: Ic797a5aceb15d32a2e1aab1ba5ad6ccb48aca1d7

3 years agoRevert "Revert "aidl: power-libperfmgr: Re-implement lineage perf hint""
David Marble [Mon, 22 Mar 2021 04:40:14 +0000 (05:40 +0100)]
Revert "Revert "aidl: power-libperfmgr: Re-implement lineage perf hint""

This reverts commit 03a61ae886e05cda81fe0da76354aab4258ecbe6.

Reason for revert: r-perf-profiles has been merged.

Change-Id: I8e5cef59d03d7f6e571d6677f40b6a730120971c

3 years agoRevert "aidl: power-libperfmgr: Re-implement lineage perf hint"
Michael Benedict [Sat, 20 Mar 2021 18:50:06 +0000 (01:50 +0700)]
Revert "aidl: power-libperfmgr: Re-implement lineage perf hint"

* The patch was merged pre-maturely before r-perf-profiles topic got merged. Lets wait properly this time and be patient.

This reverts commit c50258fca0d28826c91e661653017f67aa3e05b3.

Change-Id: I60129f3886b9ab570a3d19b1e4cef9084ab87533

3 years agoaidl: power-libperfmgr: Re-implement lineage perf hint
Michael Benedict [Fri, 5 Mar 2021 06:21:54 +0000 (13:21 +0700)]
aidl: power-libperfmgr: Re-implement lineage perf hint

Signed-off-by: Michael Benedict <michaelbt@live.com>
Co-authored-by: Jesse Chan <jc@lineageos.org>
Co-authored-by: dianlujitao <dianlujitao@lineageos.org>
Co-authored-by: Tim Zimmermann <tim@linux4.de>
Change-Id: I14fde0fee5a0294a8f546746a3eb29b2974a8fe7

3 years agoaidl: power-libperfmgr: Sync powerhint template with aidl hal changes
Michael Benedict [Sun, 14 Mar 2021 07:14:50 +0000 (14:14 +0700)]
aidl: power-libperfmgr: Sync powerhint template with aidl hal changes

* adapted from https://github.com/LineageOS/android_device_google_coral/commit/3e0c3f06a77bd6cfcca57a51b1159f9b77b28c3b

Signed-off-by: Michael Benedict <michaelbt@live.com>
Change-Id: Ib97ea5b007dc5e0e650938785218aeb365d358ff

3 years agoaidl: power-libperfmgr: Re-implement interactive and DT2W hints
Michael Benedict [Sun, 14 Mar 2021 05:19:23 +0000 (12:19 +0700)]
aidl: power-libperfmgr: Re-implement interactive and DT2W hints

* also change NOT_INTERACTIVE to INTERACTIVE so it can be used with
fallthrough

Signed-off-by: Michael Benedict <michaelbt@live.com>
Change-Id: I1af27d2503b98bd873c8fe84a1028cd46e7a4a53

3 years agoaidl: power-libperfmgr: Squash some of previous hidl power-libperfmgr commits
Michael Benedict [Sun, 14 Mar 2021 05:13:43 +0000 (12:13 +0700)]
aidl: power-libperfmgr: Squash some of previous hidl power-libperfmgr commits

These commits are adapted for aidl counterpart.
power-libperfmgr: adapt and rebrand for hardware/samsung
power-libperfmgr: simply wait if idle state node is not present
power-libperfmgr: remove Google-specific display LPM control
power-libperfmgr: remove Google-specific camera and audio hints
power-libperfmgr: Give access to radio group
power-libperfmgr: initialize powerHAL when boot is completed
power-libperfmgr: declare override="true" in manifest
power-libperfmgr: add a Power Hint template with common nodes

Notes:
* Interactive, DT2W, and Lineage perf hint will be re-implemented outside of this commit.

Signed-off-by: Michael Benedict <michaelbt@live.com>
Co-authored-by: Jesse Chan <jc@lineageos.org>
Change-Id: I7034cb083bd20ec3a62ec338f5cbfb3e3ba7a0ff

3 years agosamsung: aidl: Import Pixel Power HAL aidl impl
Michael Benedict [Sun, 27 Dec 2020 09:45:17 +0000 (16:45 +0700)]
samsung: aidl: Import Pixel Power HAL aidl impl

* from tag android-11.0.0_r18

Signed-off-by: Michael Benedict <michaelbt@live.com>
Change-Id: Ic1408f7d68463379514b62ef2f811bd1102467e1

3 years agosensors: 2.1: Squash previous sensors commits
Willi Ye [Tue, 19 Jan 2021 19:08:25 +0000 (20:08 +0100)]
sensors: 2.1: Squash previous sensors commits

sensors: 2.1: get rid of com.samsung.permission.SSENSOR

Samsung uses a permission com.samsung.permission.SSENSOR
for Samsung-specfic sensors. Android obviously does not
have that and the default is denied when there is no
permission. As such, those sensors are inaccessible.

Thus, this change removes this permission from those sensors
so we can use them.

Android does not require special permissions for most sensors
so this change doesn't attach additional permission requirements
to those sensors.

However, note that it is possible that some sensitive sensors
introduced by Samsung in the future may use SSENSOR permission
and for privacy reasons they should be handled separately with
appropriate permission control attached.

Change-Id: Ia3033898722039b285e522e226074238508f6093

sensors: 2.1: map Samsung proximity sensor type to generic

Samsung uses their own com.samsung.sensor.physical_proximity
type instead of SENSOR_TYPE_PROXIMITY of Android.

This makes proximity sensor unavailable for us as we only
look for SENSOR_TYPE_PROXIMITY.

Thus, this change maps Samsung's vendor-specific proximity
sensor type to generic one.

Change-Id: I64f6558876e1398dfbea0e5c0eb76aa1aafd2dfd

sensors: 2.1: set max range of proximity sensor to 1

Samsung's proximity sensor type is binary in nature.
There are only two state: FAR and NEAR.

However, Samsung uses values between min and max for
other purposes like proximity detection during Always-On
Display.

This breaks proximity detection during Doze for AOSP as
AOSP only considers the proximity sensor in FAR state
when the value equals or larger than max.

Thus, this change sets the max to 1 so any > 1 value
would be considered as FAR and the behavior of this vendor
proximity sensor type matches the behavior expected by AOSP.

Change-Id: I56af8e2ae743b47e3c4894e5ef68ce0b54e5cfdb

hidl:sensors: 2.1 Dump sensor information if verbose is turned on

This is useful for improving the sensors HAL.

Change-Id: I41430974b40e14095396aaf645b8b37d08b13710

sensors: 2.1: declare override="true" in manifest

Change-Id: If8349ca7b8102c3ffee545d1065d0e7d08d22652

3 years agosensors: 2.1: rename to samsung-multihal
josip-k [Sat, 16 Jan 2021 16:02:17 +0000 (17:02 +0100)]
sensors: 2.1: rename to samsung-multihal

Signed-off-by: josip-k <d3hum4niz3d@gmail.com>
Change-Id: Idfc6be9cd54dba45fc23ae0078fa08c8f9e5805f

3 years agosensors: 2.1: import HalProxy* sources
josip-k [Sat, 16 Jan 2021 15:51:38 +0000 (16:51 +0100)]
sensors: 2.1: import HalProxy* sources

    * hardware/interfaces/sensors/common/default/2.X/multihal/HalProxy*
    from android-11.0.0_r27

Signed-off-by: josip-k <d3hum4niz3d@gmail.com>
Change-Id: I8911af77b8aafa20dd4657918192059a706d33c1

3 years agosamsung: hidl: import default sensors 2.1 multihal
josip-k [Tue, 19 Jan 2021 18:35:43 +0000 (19:35 +0100)]
samsung: hidl: import default sensors 2.1 multihal

    * hardware/interfaces/sensors/2.1/multihal from android-11.0.0_r27

Signed-off-by: josip-k <d3hum4niz3d@gmail.com>
Change-Id: I253755c6a46873c04b65d4c14fea65e3c5308f0b

3 years agosamsung: sensors: move sensors HAL 1.0 impl to versioned subdir
josip-k [Sat, 16 Jan 2021 15:38:28 +0000 (16:38 +0100)]
samsung: sensors: move sensors HAL 1.0 impl to versioned subdir

    * Newer samsung devices require 2.X implementation of the sensor
    HAL, in order to avoid issues with importing 2.X service to existing
    directory, move each to its subdir

Signed-off-by: josip-k <d3hum4niz3d@gmail.com>
Change-Id: If6fc05c166ba488e0be90ec59c9c79ac29c92d79

3 years agosamsung: doze: Use all shared resources from devicesettings
Bruno Martins [Wed, 6 Jan 2021 20:51:54 +0000 (20:51 +0000)]
samsung: doze: Use all shared resources from devicesettings

Change-Id: Icd7f381c574ea36eb4d797cefd60ba9f1a0941bd

3 years agosamsung: AdvancedDisplay: Use all shared resources from devicesettings
Bruno Martins [Wed, 6 Jan 2021 20:51:54 +0000 (20:51 +0000)]
samsung: AdvancedDisplay: Use all shared resources from devicesettings

Orig-Change-Id: Icd7f381c574ea36eb4d797cefd60ba9f1a0941bd
Change-Id: I8171db59a5841e4d1f50263ace9092f986edc971

3 years agosamsung: AdvancedDisplay: Migrate to androidx
Jan Altensen [Sat, 7 Sep 2019 19:10:20 +0000 (21:10 +0200)]
samsung: AdvancedDisplay: Migrate to androidx

Change-Id: I9f6f936120e6eac06c78525f3692207ff58c991f

3 years agofastcharge: Make user setting persistent
Bruno Martins [Mon, 18 Jan 2021 22:31:07 +0000 (22:31 +0000)]
fastcharge: Make user setting persistent

Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8

3 years agofastcharge: drop libhwbinder/libhidltransport dependency
Jan Altensen [Thu, 10 Sep 2020 21:39:19 +0000 (23:39 +0200)]
fastcharge: drop libhwbinder/libhidltransport dependency

Change-Id: I1405348bcdfb63d2234d6dfa4af6e03a319d33f7

3 years agosamsung: hidl: add fastcharge implementation
Francescodario Cuzzocrea [Thu, 24 Dec 2020 15:00:30 +0000 (16:00 +0100)]
samsung: hidl: add fastcharge implementation

 * On samsung, kernel exposes a sysfs node to disable fastcharge at
   will, depending on what the user sets in battery settings UI.

 * Disabling fast charge may be useful for reducing the heat produced by
   the device while charging, or for extending the lifespan of the battery

 * This commit introduces the fastcharge HIDL, which writes in the node

              /sys/class/sec/switch/afc_disable

   0 or 1 depeding on user selection.
   0 means that fastcharge is enabled, while 1 means that fastcharge is
     disabled

Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb

3 years agosamsung: doze: Allow to wake the screen on gestures instead of pulsing
Arian [Wed, 14 Oct 2020 21:06:47 +0000 (23:06 +0200)]
samsung: doze: Allow to wake the screen on gestures instead of pulsing

Co-authored-by: Nauval Rizky <enuma.alrizky@gmail.com>
Co-authored-by: Fabian Leutenegger <fabian.leutenegger@bluewin.ch>
Change-Id: I1e74f8eafa51843e77d2d8c514c646a4494327cd

3 years agosamsung: doze: Drop unnecessary permissions
Bruno Martins [Sat, 26 Dec 2020 20:23:49 +0000 (20:23 +0000)]
samsung: doze: Drop unnecessary permissions

Maybe it is just a leftover, but these permissions are certainly
not needed for the current doze implementation.

Change-Id: I9bc83eee591e0a8c258a5fa8b8443652729aeaa4

3 years agosamsung: doze: Fix AoD default pref
Henrique Silva [Thu, 17 Jan 2019 23:40:14 +0000 (21:40 -0200)]
samsung: doze: Fix AoD default pref

* Fixes non-working pulse notifications from sensors until user toggles
  the main switch and also sets the proper initial status of the
  AoD preference for the devices that have the feature available.

Signed-off-by: Henrique Silva <jhenrique09.mcz@hotmail.com>
Change-Id: I8e554decca3734b165fdc722d904d90713666db9

3 years agosamsung: doze: Move Utils.checkDozeService in an handler
Luca Stefani [Tue, 8 Jan 2019 13:56:52 +0000 (14:56 +0100)]
samsung: doze: Move Utils.checkDozeService in an handler

* There's no need to manually write to the gestures prefs
  as long we are sure the handler is run after we return true
  in the onPreferenceChangeListner

Change-Id: I090c0c6c91267aff69c45365b95b5f5e26d07b07

3 years agosamsung: doze: Make AOD preference not persistent
Luca Stefani [Tue, 8 Jan 2019 14:15:43 +0000 (15:15 +0100)]
samsung: doze: Make AOD preference not persistent

Change-Id: I9d80e94de02d35c85765302a01b53020824dd0ff

3 years agosamsung: doze: Add AOD support to Ambient Display
Bruno Martins [Tue, 1 Jan 2019 12:39:38 +0000 (12:39 +0000)]
samsung: doze: Add AOD support to Ambient Display

 * This makes the always on display mode feature visible for those
   devices that explicitly set it as available via AOSP overlay.
   Should only be enabled on devices where the display has been tuned
   to be power efficient in DOZE and/or DOZE_SUSPEND states.

Change-Id: If543936f9421dd7a6c0be594f7cb76afb227e34b

3 years agosamsung: doze: use ExecutorService for listener registration
ezio84 [Thu, 14 Jun 2018 13:00:19 +0000 (15:00 +0200)]
samsung: doze: use ExecutorService for listener registration

Replicate what Google did for SystemUI in this commit.
https://github.com/aosp-mirror/platform_frameworks_base/commit/fabc743bcf6e6623e530545c4b31285ea642f087

Registering a sensor seems to be an expensive operation,
and we do it on each screen-on event, so moving it to
an asynchronous task looks like a good idea anyway.

By moving all non-essential binder calls of the main thread or to the
next frame, we bring this down to 5ms, such that window animation
and Keyguard animation starts about at the same time.

The interesting part about the ExecutorService:
"Memory consistency effects: Actions in a thread prior to the submission
of a Runnable or Callable task to an ExecutorService happen-before any
actions taken by that task, which in turn happen-before the result is
retrieved via Future.get()."
(from https://developer.android.com/reference/java/util/concurrent/ExecutorService)

Change-Id: I4f37bb9a7dc9d7775d587d4ebd4b6619f3b77e81

3 years agosamsung: doze: Apply a major refactor
Bruno Martins [Sat, 26 Dec 2020 14:55:22 +0000 (14:55 +0000)]
samsung: doze: Apply a major refactor

 * Introduce a main switch to actually enable/disable doze globally
 * Move preferences handling out of SamsungDozeService class and
   create Utils class to hold all helper methods.

Change-Id: Idb40650296d50352b4a985d2068f14cda6cb4aaf

3 years agosamsung: doze: Kill proximity wake feature
Bruno Martins [Sat, 26 Dec 2020 17:02:30 +0000 (17:02 +0000)]
samsung: doze: Kill proximity wake feature

This will be reworked later on.

Change-Id: I47e2b0a0c7814ac6a0f33e0016d1c52c7afe222b