GitHub/LineageOS/android_hardware_samsung.git
3 years agothermal: remove redundant cdev_to_watch registration
TeYuan Wang [Thu, 19 Mar 2020 13:24:00 +0000 (21:24 +0800)]
thermal: remove redundant cdev_to_watch registration

cdev_to_watch fd causes pollOnce function return immediatly.
Because thermalhal does not monitor cdev status now,
so remove cdev_to_watch fd to avoid threadLoop busy problem.

Bug: 151897840
Test: Verified thermalhal notifythrottling via emul_temp
      thermalhal will not keep busy.
Change-Id: I999c9b843dde5870d83d8305d5517196188fa819
Signed-off-by: TeYuan Wang <kamewang@google.com>
3 years agothermal: Fix bugprone-use-after-move.
Josh Gao [Wed, 18 Mar 2020 02:27:13 +0000 (19:27 -0700)]
thermal: Fix bugprone-use-after-move.

fd was moved out of, so we were adding -1 to the looper.

Bug: http://b/150783499
Test: treehugger

(cherry picked from commit 56ed76601d2fa5f1a1e6f7f24d79975a69f43a39)

Change-Id: Ib571f32078fd9adb91a1e619110330583b75482b

3 years agothermal: Optimize uevent monitor timeout mechanism
TeYuan Wang [Mon, 9 Mar 2020 11:17:56 +0000 (19:17 +0800)]
thermal: Optimize uevent monitor timeout mechanism

If non-thermal uevents keep triggered, thermalhal will
not hit uevent timeout to update temperature.

Bug: 138257706
Test: pts-tradefed run pts -m PtsThermalHalTestCases

Change-Id: I8470b95f34ff3867e1a9c677e3712d8c8deb3a3c
Signed-off-by: TeYuan Wang <kamewang@google.com>
3 years agothermal: Add thermal logging daemon
Wei Wang [Wed, 20 Nov 2019 20:00:21 +0000 (12:00 -0800)]
thermal: Add thermal logging daemon

Bug: 126562025
Bug: 144859663
Test: build and check thermal logging
Change-Id: I996546110f4d66b3ff8052cb46000fe0e5f7b0da

3 years agothermal: Adds missing interface for vendor.thermal-hal-2-0.
Daniel Norman [Wed, 10 Jul 2019 21:21:52 +0000 (14:21 -0700)]
thermal: Adds missing interface for vendor.thermal-hal-2-0.

init_rc files require the entire interface inheritance hierarchy to
be listed, since e.g. all 1.0::IThermal functions are also implemented
by 2.0::IThermal.

Bug: 118016875
Test: builds & passes existing tests.
Merged-In: I3fe1bc5e103fc3dd631f5dabc3408803dbdcbd60
Change-Id: I3fe1bc5e103fc3dd631f5dabc3408803dbdcbd60

4 years agolivedisplay: Set sysfs ownership/perms on init for qcom lineage-18.0
Kevin F. Haggerty [Sun, 1 Nov 2020 17:36:32 +0000 (10:36 -0700)]
livedisplay: Set sysfs ownership/perms on init for qcom

* Change I87ec20e3b0c9e9559963bebe7221f51e1dd4d7f3 made assumptions
  that aren't true

Change-Id: I898362c1888ab46afbfad3ecbf8a94a70d2f6fd7
(cherry picked from commit 8f04a50d7cb945deb9da5920948f1eef8ab88857)

4 years agosamsung: convert dtbhtoolExynos to blueprint
Jan Altensen [Thu, 10 Sep 2020 22:08:00 +0000 (00:08 +0200)]
samsung: convert dtbhtoolExynos to blueprint

Change-Id: I0f9aff67e76ac47f792e92fca4802b50f893d37c

4 years agosamsung: mkbootimg: remove recovery.id generation
Jan Altensen [Mon, 21 Sep 2020 20:07:01 +0000 (22:07 +0200)]
samsung: mkbootimg: remove recovery.id generation

 * this is not a thing anymore

Change-Id: I5eddbf4ddc2dcd0becf22b295e0a880d34446ac7

4 years agolibril: Remove unused includes.
Elliott Hughes [Thu, 8 Aug 2019 16:54:29 +0000 (09:54 -0700)]
libril: Remove unused includes.

Test: treehugger
Change-Id: Id6ee53aa0e2a83ef40ce9219092f8a0f519b3471

4 years agoloki_tool: convert to blueprint
Jan Altensen [Fri, 11 Sep 2020 11:16:32 +0000 (13:16 +0200)]
loki_tool: convert to blueprint

Change-Id: Id35492c9f671c265d4b637eb4d536e812f48282b

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

Change-Id: Iaa0232ba6ab8235454340416b0995994c908a2ee

4 years agopower-libperfmgr: import hardware/google/pixel namespace
Jan Altensen [Thu, 10 Sep 2020 21:36:41 +0000 (23:36 +0200)]
power-libperfmgr: import hardware/google/pixel namespace

Change-Id: Ic8a339f082d965d412cb3c3a4af7ecd726d2de32

4 years agopower-libperfmgr: move double tap to wake out of setInteractive()
Tim Zimmermann [Mon, 7 Sep 2020 11:07:43 +0000 (13:07 +0200)]
power-libperfmgr: move double tap to wake out of setInteractive()

enabling/disabling DT2W inside setInteractive() doesn't work correctly
on some newer samsung devices so enable/disable it only when the setting
has changed and on boot

Change-Id: I3a5d8471e007e5f78c7df8da3cc629fb452e72d9

4 years agohidl:thermal: Add README.md and template config
Francescodario Cuzzocrea [Sun, 19 Jul 2020 17:48:12 +0000 (19:48 +0200)]
hidl:thermal: Add README.md and template config

Change-Id: Ie7d3b0bccacb7568cd4523483452eb386d21fc9e

4 years agohidl:thermal: Rebrand to Samsung
Francescodario Cuzzocrea [Wed, 15 Jul 2020 17:59:28 +0000 (19:59 +0200)]
hidl:thermal: Rebrand to Samsung

Change-Id: I9119f21538c99143a5d0ec810ec1a0a7b43cacc9

4 years agohidl: Import pixel thermal HAL
Francescodario Cuzzocrea [Wed, 15 Jul 2020 17:56:58 +0000 (19:56 +0200)]
hidl: Import pixel thermal HAL

 * imported from https://android.googlesource.com/platform/hardware/google/pixel/+/refs/tags/android-10.0.0_r40
 * commit 2f5b7f6916cde0633e0276c4ff5fe3d1f84d1d21

Change-Id: I032cb6aa43245e974c14fbae5c030a9e11d7b840

4 years agohidl:sensors: Dump sensor information if verbose is turned on
Andreas Schneider [Thu, 16 Jul 2020 15:07:39 +0000 (17:07 +0200)]
hidl:sensors: Dump sensor information if verbose is turned on

This is useful for improving the sensors HAL.

Change-Id: I41430974b40e14095396aaf645b8b37d08b13710

4 years agopower-libperfmgr: Always wait after changing DOUBLE_TAP_TO_WAKE
Andreas Schneider [Thu, 9 Jul 2020 07:12:44 +0000 (09:12 +0200)]
power-libperfmgr: Always wait after changing DOUBLE_TAP_TO_WAKE

This avoids that we enter a screen state where it doesn't react anymore
if you quickly turn off and on the screen.

Change-Id: I8d7fc756d1631e9f739dbe10554b58ba0c0c5576

4 years agopower-libperfmgr: Fix dt2w after boot
Andreas Schneider [Tue, 7 Jul 2020 06:10:35 +0000 (08:10 +0200)]
power-libperfmgr: Fix dt2w after boot

Change-Id: Ia6172d2f1a54900b8859eef55f07d37a6eab8487

4 years agofingerprint: inscreen: remove dimming on Press
Jesse Chan [Wed, 1 Jul 2020 11:58:07 +0000 (19:58 +0800)]
fingerprint: inscreen: remove dimming on Press

Not neccessary for our FOD sensor.

Change-Id: Id35ecfa99e99b12e4662fedbd3b158f57825b53e

4 years agofingerprint: inscreen: enable FOD in TSP in initialization
Jesse Chan [Wed, 1 Jul 2020 11:43:55 +0000 (19:43 +0800)]
fingerprint: inscreen: enable FOD in TSP in initialization

Samsung enables FOD in TS driver (fod_enable) at all times except
a small number of optical FOD sensor that doesn't have BiometricFeature
.FEATURE_SUPPORT_AOD. As optical type sensor support is not implemented
currently, this HAL is only used on device that has FOD always-on.

This change follows behavior of stock firmware and without toggling of
FOD enable state FOD should be more stable.

Plus it allows setInteractive and config_powerDecoupleInteractiveModeFromDisplay
to function properly with FOD. Currently setInteractive(0) happens before
a onShowFODView (which is the current point to call fod_enable) can be
triggered by the Doze, as TS driver only handles command when it is enabled,
FOD doesn't work when there is a setInteractive(0) that disables TS.

Change-Id: I22291cc62d81ffdaa5edd3f684f9788b0c0650c2

4 years agopower-libperfmgr: Correctly implement DT2W support
Andreas Schneider [Wed, 1 Jul 2020 06:23:57 +0000 (08:23 +0200)]
power-libperfmgr: Correctly implement DT2W support

Change-Id: I9ed6e8886322c787ae69f2f79eb7c9b664ce08d7

4 years agopower-libperfmgr: add a Power Hint template with common nodes
Jesse Chan [Sat, 13 Jun 2020 11:44:01 +0000 (19:44 +0800)]
power-libperfmgr: add a Power Hint template with common nodes

Change-Id: I12c0e8e33b49f0eeffba43f520272ec76451511f
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agopower-libperfmgr: implement Lineage perf profiles
Jesse Chan [Tue, 30 Jun 2020 14:22:42 +0000 (22:22 +0800)]
power-libperfmgr: implement Lineage perf profiles

Change-Id: Ia247ee65a668689168be009a59355d97ce4f2cca

4 years agopower-libperfmgr: add a DOUBLE_TAP_TO_WAKE hint
Jesse Chan [Tue, 30 Jun 2020 13:19:08 +0000 (21:19 +0800)]
power-libperfmgr: add a DOUBLE_TAP_TO_WAKE hint

Change-Id: I656b5eb836fb0c41fed8802efa51cbae9fdbc0c0

4 years agopower-libperfmgr: add a NOT_INTERACTIVE hint for setInteractive
Jesse Chan [Tue, 30 Jun 2020 13:01:06 +0000 (21:01 +0800)]
power-libperfmgr: add a NOT_INTERACTIVE hint for setInteractive

Change-Id: I0797c47e0b1d8bfee644f0028eaabd7650e39913
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agopower-libperfmgr: add an updateHint function for simple hint ops
Jesse Chan [Tue, 30 Jun 2020 13:13:53 +0000 (21:13 +0800)]
power-libperfmgr: add an updateHint function for simple hint ops

Change-Id: I2e64f23b5435f7262b36acd52916b5ac795dd106

4 years agopower-libperfmgr: declare override="true" in manifest
Jesse Chan [Mon, 29 Jun 2020 04:38:58 +0000 (12:38 +0800)]
power-libperfmgr: declare override="true" in manifest

Change-Id: If8349ca7b8102c3ffee545d1065d0e7d08d22652

4 years agopower-libperfmgr: initialize powerHAL when boot is completed
Jesse Chan [Mon, 29 Jun 2020 04:32:17 +0000 (12:32 +0800)]
power-libperfmgr: initialize powerHAL when boot is completed

Change-Id: I801b3aba05ef0be14c7af1969ddf9318c05ef64c

4 years agopower-libperfmgr: Give access to radio group
Andreas Schneider [Wed, 1 Jul 2020 08:04:49 +0000 (10:04 +0200)]
power-libperfmgr: Give access to radio group

The LCD and touchscreen nodes are owned by system:radio on Exynos
devices.

Change-Id: I465f68fac9e7a73392940a58ce70f9afacad47b7

4 years agopower-libperfmgr: remove Google-specific camera and audio hints
Jesse Chan [Mon, 29 Jun 2020 04:26:29 +0000 (12:26 +0800)]
power-libperfmgr: remove Google-specific camera and audio hints

Change-Id: I65285ca8c7248bd1e55d3800862e96c00f00effd

4 years agopower-libperfmgr: remove Google-specific display LPM control
Jesse Chan [Sat, 13 Jun 2020 04:06:26 +0000 (12:06 +0800)]
power-libperfmgr: remove Google-specific display LPM control

Change-Id: If58f38b99bf6fbd73f6b6ab2144293c63e18b600
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agopower-libperfmgr: simply wait if idle state node is not present
Jesse Chan [Sat, 13 Jun 2020 03:52:12 +0000 (11:52 +0800)]
power-libperfmgr: simply wait if idle state node is not present

Change-Id: I93dd97e5437761d2d969f93a5af0cae864fd0a65
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agopower-libperfmgr: adapt and rebrand for hardware/samsung
Jesse Chan [Sat, 13 Jun 2020 03:22:14 +0000 (11:22 +0800)]
power-libperfmgr: adapt and rebrand for hardware/samsung

Change-Id: I8aa9a712ac7cbc6085928f7cdb9e6ada8ed5e3fe

4 years agosamsung: hidl: import Pixel libperfmgr Power HAL
Jesse Chan [Sat, 13 Jun 2020 03:17:52 +0000 (11:17 +0800)]
samsung: hidl: import Pixel libperfmgr Power HAL

hardware/google/pixel/power-libperfmgr from android-10.0.0_r39

Change-Id: I969f76219e6507627d3689b3c2dc025983bcfde4
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agohidl: Add standard timed_out vibrator service
Andreas Schneider [Mon, 25 May 2020 15:10:35 +0000 (17:10 +0200)]
hidl: Add standard timed_out vibrator service

Change-Id: I48164e9adfa52cd223c5a2925fa3b48417a6e50c

4 years agohidl: powershare: add vintf manifest fragment
Linux4 [Fri, 22 May 2020 12:47:04 +0000 (14:47 +0200)]
hidl: powershare: add vintf manifest fragment

Change-Id: I7fddba246ce58127192b7cebcaa09da667e33c91

4 years agofingerprint: inscreen: add vintf manifest fragment
Jesse Chan [Thu, 21 May 2020 13:42:06 +0000 (21:42 +0800)]
fingerprint: inscreen: add vintf manifest fragment

Change-Id: Ie9579e4dea63fd8210f0d3a0a0fa41bd3202d352

4 years agoAutomatic translation import
Michael Bestas [Sat, 23 May 2020 15:20:03 +0000 (18:20 +0300)]
Automatic translation import

Change-Id: I7f11df70b63f3b068d9aac0d1e9ef1476f79c029

4 years agosensors: set max range of proximity sensor to 1
Jesse Chan [Sat, 16 May 2020 13:17:25 +0000 (21:17 +0800)]
sensors: 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

4 years agofingerprint: inscreen: allow to set_fod_rect at boot
Jesse Chan [Fri, 8 May 2020 16:26:54 +0000 (00:26 +0800)]
fingerprint: inscreen: allow to set_fod_rect at boot

We found that stock firmware calculates the fod rect
from resolution and a set of inscreen fingerprint
sensor position data at boot and then use set_fod_rect
command to tell the Kernel TSP driver.

Then the Kernel TSP driver wrote it to "sponge"
(presumably firmware of touchscreen panel).

It is not yet known what exactly was done with this
data but it is good to keep in line with stock
firmware when we can.

Change-Id: Id44d399a8dc482c7d6f320a3bbfea1282ac4f83a
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agofingerprint: inscreen: enable sensor on ShowFODView
Jesse Chan [Fri, 8 May 2020 16:08:23 +0000 (00:08 +0800)]
fingerprint: inscreen: enable sensor on ShowFODView

Enabling sensor on Press is slow and frequent on/off
switching on Press/Release leads to unexpected results.

Looking into Kernel, the purpose of FOD_ENABLE/FOD_DISABLE
commands are to save battery. (ts->lowpower_mode) It is not
meant to handle fingerprint authentication on Press/Release.

It is expected that FOD is in ENABLED state whenever the user
is EXPECTED to use fingerprint authentication soon.

Thus, this patch moved FOD_ENABLE/FOD_DISABLE from
OnPress/onRelease to onShowFODView/onHideFODView so the
fingerprint authentication can be faster and the logic makes
more sense.

Change-Id: Id94b71acd55038d6eda7a1a89dde5fdf5a1e298f
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agosensors: get the full list of sensors
Andreas Schneider [Fri, 24 Apr 2020 14:57:08 +0000 (16:57 +0200)]
sensors: get the full list of sensors

Samsung uses a special OperationMode (5555).

Thanks to Pierre-Hugues HUSSON for the hint.

Change-Id: I037ff5bf5a1edd65b616480d1c43cef8e61ba999
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agosensors: map Samsung proximity sensor type to generic
Willi Ye [Sun, 8 Sep 2019 16:23:04 +0000 (18:23 +0200)]
sensors: 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
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agosensors: get rid of com.samsung.permission.SSENSOR
Willi Ye [Sun, 8 Sep 2019 16:23:04 +0000 (18:23 +0200)]
sensors: 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
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agosensors: adapt and rebrand for hardware/samsung
Jesse Chan [Fri, 15 May 2020 13:48:07 +0000 (21:48 +0800)]
sensors: adapt and rebrand for hardware/samsung

Change-Id: I6c0521888ad60e5ecdd967809f91d0962a7c08a8
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agosamsung: hidl: import default sensors HAL 1.0 impl
Jesse Chan [Fri, 15 May 2020 13:44:02 +0000 (21:44 +0800)]
samsung: hidl: import default sensors HAL 1.0 impl

hardware/interfaces/sensors/1.0/default from android-10.0.0_r35

Change-Id: Ide758984cd50b94382b320572ded7a62691aae52
Signed-off-by: Jesse Chan <jc@lineageos.org>
4 years agosamsung: hidl: add powershare
Linux4 [Mon, 20 Apr 2020 15:41:47 +0000 (17:41 +0200)]
samsung: hidl: add powershare

Change-Id: I7ebfc84674c3a29c7cca53861d71d3e9b94947fd

4 years agosamsung: hidl: fingerprint: Add inscreen support
Willi Ye [Wed, 13 Nov 2019 00:38:23 +0000 (01:38 +0100)]
samsung: hidl: fingerprint: Add inscreen support

Change-Id: I18e1835fd268d8b819f874029a88065d8be167bf

4 years agoAutomatic translation import
Michael Bestas [Thu, 23 Apr 2020 13:46:00 +0000 (16:46 +0300)]
Automatic translation import

Change-Id: I69cf83604c2915079978ca38f1654c02550c3e1d

4 years agosamsung: hidl: power: fixup setInteractive while display is on
Jan Altensen [Fri, 27 Mar 2020 15:40:28 +0000 (16:40 +0100)]
samsung: hidl: power: fixup setInteractive while display is on

Change-Id: I5cdf542650fa3baf416d5a1cb88cd7034efb407f

4 years agoAutomatic translation import
Michael Bestas [Mon, 30 Mar 2020 17:27:49 +0000 (20:27 +0300)]
Automatic translation import

Change-Id: Icf6cddef80717d18b8a7b5229f83c157484bcaad

4 years agosamsung: remove old power hal
Jan Altensen [Sun, 29 Mar 2020 16:53:01 +0000 (18:53 +0200)]
samsung: remove old power hal

 * a hidl replacement exist

Change-Id: I2df55148c1492a93f321e3b3a31f0704c071b9aa

4 years agohidl: Don't compile setNotificationLED if there is no blink node
Andreas Schneider [Fri, 13 Mar 2020 19:26:02 +0000 (20:26 +0100)]
hidl: Don't compile setNotificationLED if there is no blink node

For example exynos9820 doesn't provide a LED.

Change-Id: I745f179fae52816c915833321123c8f49ba0a7d2

4 years agosamsung: doze: Clean up proguard flags
Bruno Martins [Mon, 2 Sep 2019 09:15:57 +0000 (10:15 +0100)]
samsung: doze: Clean up proguard flags

Change-Id: If0250fb629417d36c2af7286bc0620e682c4576e

4 years agosamsung: Doze: Migrate to androidx
Bruno Martins [Tue, 9 Jul 2019 21:31:00 +0000 (22:31 +0100)]
samsung: Doze: Migrate to androidx

Change-Id: Ifaa67283a3437549a2304088a0ce377b399da19f

4 years agosamsung: doze: Set LOCAL_PRIVATE_PLATFORM_APIS
Anton Hansson [Wed, 21 Feb 2018 14:11:44 +0000 (14:11 +0000)]
samsung: doze: 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

4 years agosamsung: doze: Rename to avoid conflicts with AdvancedDisplay
Paul Keith [Thu, 22 Feb 2018 00:55:15 +0000 (01:55 +0100)]
samsung: doze: Rename to avoid conflicts with AdvancedDisplay

Change-Id: I669835f3563b9eea4fce6db45552c0e3a0888911

4 years agosamsung: doze: Re-integrate into Settings
Bruno Martins [Wed, 18 Oct 2017 01:10:01 +0000 (03:10 +0200)]
samsung: doze: Re-integrate into Settings

* Apply the default Oreo theme and inherit the layouts
  from Google for the Settings app, in order to keep
  UI consistency.

* Get rid of SettingsDrawerActivity as it no longer fits in
  and include the back button in the action bar.

* Kill the icon drawable not only because is a leftover,
  but also doesn't really serve any puropose in the new UI.

Change-Id: I71ea2c118dcfd387904d04516572902babb16e35

4 years agosamsung: doze: Build with AAPT2
Bruno Martins [Mon, 16 Oct 2017 00:33:15 +0000 (02:33 +0200)]
samsung: doze: Build with AAPT2

Change-Id: Id0a60b490a504010dc8b3f16aa495044719a4062

4 years agosamsung: doze: Rebrand from cyanogenmod to lineageos
Arne Coucheron [Sat, 14 Oct 2017 06:21:29 +0000 (08:21 +0200)]
samsung: doze: Rebrand from cyanogenmod to lineageos

Change-Id: I619080f46a69a80fe3923cb3df6a676242f36eac

4 years agosamsung: doze: Remove extraneous meta-data
Zhao Wei Liew [Tue, 24 Jan 2017 05:06:32 +0000 (13:06 +0800)]
samsung: doze: Remove extraneous meta-data

We aren't using this currently, so get rid of it.

Change-Id: I3f35f65ebfd9e41d646211b982f3272c2bfd519f

4 years agosamsung: doze: specify a qualified user to send the pulse broadcast
Sean hoyt [Tue, 17 Jan 2017 07:13:21 +0000 (07:13 +0000)]
samsung: doze: specify a qualified user to send the pulse broadcast

Should fix this:

W/ContextImpl(3700): Calling a method in the system process without a qualified user:
android.app.ContextImpl.sendBroadcast:877
android.content.ContextWrapper.sendBroadcast:421
com.cyanogenmod.settings.device.SamsungDozeService.launchDozePulse:151
com.cyanogenmod.settings.device.SamsungDozeService.-wrap1:-1
com.cyanogenmod.settings.device.SamsungDozeService$SamsungProximitySensor.onSensorChanged:81

Change-Id: I680a57c9010d06719c3bd014001b00353f8e12fd

4 years agosamsung: doze: Protect com.android.systemui.doze.pulse
Gabriele M [Thu, 10 Nov 2016 22:19:44 +0000 (23:19 +0100)]
samsung: doze: Protect com.android.systemui.doze.pulse

As stated in ActivityManagerService:

  The vast majority of broadcasts sent from system internals
  should be protected to avoid security holes

Change-Id: I1dc989d9d132d40835ca8dbf277285eb88e30a58

4 years agoRevert "Revert "samsung: doze: Add back button to action bar""
Zhao Wei Liew [Sun, 15 Jan 2017 12:27:20 +0000 (12:27 +0000)]
Revert "Revert "samsung: doze: Add back button to action bar""

As of commit 8cd28f3bce5612d35c4b6196554c7e2846057310,
this app no longer lives on the Settings dashboard.

This reverts commit a75b016e61ef544abdadf4c5e7a508c04b18c8dc.

Change-Id: If5b1fa89ddcc9de3c93217ef79189ad9ebd5193d

4 years agosamsung: doze: Move to display settings
Zhao Wei Liew [Tue, 13 Dec 2016 04:03:32 +0000 (12:03 +0800)]
samsung: doze: Move to display settings

Reduce the clutter on the dashboard and move the ambient display
settings to where it belongs - in the display settings.

Change-Id: Ib08cc799e9f58884465b1730ce794cbc8be080f9

4 years agosamsung: doze: Clean up ambient display pref dependencies
Zhao Wei Liew [Thu, 13 Oct 2016 10:33:52 +0000 (18:33 +0800)]
samsung: doze: Clean up ambient display pref dependencies

 * Use SecureSettingSwitchPreference for Ambient Display
 * Use the XML preference dependency attribute

Change-Id: I3480af71e334110aed834a53f49b33a853f16316

4 years agosamsung: doze: Commonize strings translations
Abhisek Devkota [Thu, 24 Nov 2016 02:13:45 +0000 (18:13 -0800)]
samsung: doze: Commonize strings translations

 * Translations moved to the new project
    android_packages_resources_devicesettings

Change-Id: I06536915e1963a2fe464c3d6c46dd8728aba0cb4
Signed-off-by: Adrian DC <radian.dc@gmail.com>
4 years agosamsung: doze: Improve Settings search UX
Zhao Wei Liew [Sat, 8 Oct 2016 05:12:19 +0000 (13:12 +0800)]
samsung: doze: Improve Settings search UX

Currently, the preference titles are very vague and confusing,
with no way for the user to understand what the preferences
do at a glance (e.g. in Settings search).

Make the purpose of the preferences more explicit through the titles.

Also, the current drawable is colored white, when it should be
colored green. This results in a near-invisible icon in the
Settings search results.

Color the drawable the appropriate teal instead.

Change-Id: I2dac9a73e8689f14d676b41922e0eba364c6500f

4 years agosamsung: doze: Integrate with Settings
Zhao Wei Liew [Wed, 7 Sep 2016 10:20:51 +0000 (18:20 +0800)]
samsung:  doze: Integrate with Settings

Bring this up to speed on the Settings changes in N:
 * Use support libs for preferences
 * Hook up to Settings drawer through SettingsDrawerActivity

Change-Id: I9365b3ebd1bbfed2936302e30da50e3f9af06665

4 years agoRevert "samsung: doze: Add back button to action bar"
Zhao Wei Liew [Sat, 3 Sep 2016 09:41:48 +0000 (17:41 +0800)]
Revert "samsung: doze: Add back button to action bar"

Starting N, top-level Settings activities should a drawer menu up
on the action bar. Remove the up/back button as it is now obsolete.

This reverts commit 5cfd7e76cf8099ebd22f4580cac8ed2217c3ead4.

Change-Id: I07af4c08a12bafbef424d01f62521cf226abbc2f

4 years agosamsung: doze: Use new mechanism to include tiles into settings dashboard.
Danny Baumann [Wed, 16 Mar 2016 15:19:00 +0000 (10:19 -0500)]
samsung: doze: Use new mechanism to include tiles into settings dashboard.

Change-Id: I91cce3ee6faac16402c84f08e4957b1e3722eaa6

4 years agosamsung: doze: remove screen_gestures_panel_summary
KhasMek [Thu, 31 Dec 2015 15:38:04 +0000 (08:38 -0700)]
samsung: doze: remove screen_gestures_panel_summary

  The gestures settings are the only settings on the
  main screen to contain a summary line, and it looks
  extremely out of place.

Change-Id: I2cacef71e8db204ab4380f77d9282009e0e5df03
Signed-off-by: KhasMek <Boushh@gmail.com>
4 years agosamsung: doze: use ScreenType util from cmsdk
Michael Bestas [Tue, 1 Dec 2015 22:24:07 +0000 (16:24 -0600)]
samsung: doze: use ScreenType util from cmsdk

Change-Id: I73b610bc71bf07b2fdedb1d5c5931e90f1e6de0f

4 years agosamsung: doze: fix typo
Dave Daynard [Wed, 9 Sep 2015 02:56:10 +0000 (22:56 -0400)]
samsung: doze: fix typo

Change-Id: Id7716387688080b5ce0a99a4d968e210d8eed6f9

4 years agosamsung: doze: properly fix future timestamp error
Patrick Lower [Wed, 5 Aug 2015 14:51:03 +0000 (10:51 -0400)]
samsung: doze: properly fix future timestamp error

Previously attempted fix at review.cyanogenmod.org/#/c/104083/
The timestamp isn't in the future, that would be impossible.
The real issue is the timestamp from the SensorEvent is a true
timestamp, the System.nanoTime is nanoseconds since boot.
So the previous patch would always return false and never pulse.
I've simply changed it so that the wakeup call gets sent the current
System.nanoTime in milliseconds since boot so it does not think the
event came from the future since the wakeUp method expects
uptimeMillis, not true world time.

Change-Id: I78f5e9d61107caf9c3bf6c10fa7c5bb400082294

4 years agosamsung: doze: Prevent a pm wakeup with a timestamp in the future
Brandon McAnsh [Fri, 24 Jul 2015 19:40:45 +0000 (15:40 -0400)]
samsung: doze: Prevent a pm wakeup with a timestamp in the future

Prevents:

java.lang.IllegalArgumentException: event time must not be in the future
at android.os.Parcel.readException(Parcel.java:1550)
        at android.os.Parcel.readException(Parcel.java:1499)
        at android.os.IPowerManager$Stub$Proxy.wakeUp(IPowerManager.java:550)
        at android.os.PowerManager.wakeUp(PowerManager.java:666)
        at com.cyanogenmod.settings.device.SamsungDozeService$SamsungProximitySensor.shouldPulse(SamsungDozeService.java:95)
        at com.cyanogenmod.settings.device.SamsungDozeService$SamsungProximitySensor.onSensorChanged(SamsungDozeService.java:75)
        at android.hardware.SystemSensorManager$SensorEventQueue.dispatchSensorEvent(SystemSensorManager.java:405)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:143)
        at android.os.Looper.loop(Looper.java:122)
        at android.app.ActivityThread.main(ActivityThread.java:5289)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

Change-Id: I8ed248271d67216e531b124bf27101fa538f1195
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
4 years agosamsung: restore proximity wake preference on boot
Dave Daynard [Sat, 4 Jul 2015 17:44:53 +0000 (13:44 -0400)]
samsung: restore proximity wake preference on boot

Change-Id: I614772d6ff1005968a7f8f1ed0349e3878ddadf1

4 years agosamsung: doze: add proximity wake
Dave Daynard [Mon, 25 May 2015 16:54:00 +0000 (12:54 -0400)]
samsung: doze: add proximity wake

Change-Id: Ib02f4611e7b8bc09d540ca5c49aab68ef27f188b

4 years agosamsung: doze: Add back button to action bar
luca020400 [Sun, 24 May 2015 22:47:17 +0000 (15:47 -0700)]
samsung: doze: Add back button to action bar

Change-Id: Ia56183c8c2d5a6bc25c84f1d1b9823b84bc936c9

4 years agosamsung: doze: fix defaults
Dave Daynard [Sat, 23 May 2015 22:29:13 +0000 (18:29 -0400)]
samsung: doze: fix defaults

Change all defaults to false

Change-Id: I2df507b2fc823d3fb07bce89d44067db565a5ab8

4 years agosamsung: doze: Consolidate doze settings
Christopher R. Palmer [Sat, 23 May 2015 18:42:49 +0000 (11:42 -0700)]
samsung: doze: Consolidate doze settings

* Allow user to disable ambient display from gesture panel
* Disable/enable doze settings based on ambient display state

Change-Id: I0ff7686ccc04037b3ada9a8355384ba6746cf30c

4 years agosamsung: doze: Set gesture to disabled by default
Arne Coucheron [Tue, 19 May 2015 22:56:19 +0000 (00:56 +0200)]
samsung: doze: Set gesture to disabled by default

Change-Id: I0bf3f6a3a4c01bab7ff7522e916e2149f9cfe8d5

4 years agosamsung: doze: Add service for using proximity sensor for wake-up
Patrick Lower [Mon, 11 May 2015 20:14:17 +0000 (16:14 -0400)]
samsung: doze: Add service for using proximity sensor for wake-up

* Added custom service that uses proximity sensor in wake-up mode
  to trigger display on
* If more sensor triggers are suitable to use, they can be added
  to the service

Change-Id: Id0849fb5c17ff569d771a19cebfc579dc93dbc48

4 years agosamsung: move modemloader and wifiloader to /vendor
Danny Wood [Fri, 29 Nov 2019 13:48:37 +0000 (13:48 +0000)]
samsung: move modemloader and wifiloader to /vendor

Init scripts and SEPolicy need updating after this change.

Example on universal7580:
https://review.lineageos.org/c/LineageOS/android_device_samsung_universal7580-common/+/264957

Change-Id: Ia1d8801a2b06eca89d05257e9c011799082c66a9

4 years agosamsung: hidl: add exynos hidl power hal
Jan Altensen [Sat, 1 Feb 2020 05:21:33 +0000 (06:21 +0100)]
samsung: hidl: add exynos hidl power hal

Change-Id: I993353943dd1be7104b6790bfd2d73cd6f63260a

4 years agosamsung: hidl: fingerprint: call cancel on fingerprint enrollment completion
Danny Wood [Sat, 22 Feb 2020 06:36:04 +0000 (06:36 +0000)]
samsung: hidl: fingerprint: call cancel on fingerprint enrollment completion

Change-Id: I288613b772e3b31b86c7dffd5903dbe21ce5d5a9

4 years agosamsung: hidl: fingerprint: call notify on cancel
Jan Altensen [Wed, 21 Aug 2019 21:34:48 +0000 (23:34 +0200)]
samsung: hidl: fingerprint: call notify on cancel

Change-Id: Idb1b3200e571c546441fa9c0cfd1a1728e165a96

4 years agosamsung: hidl: correct USES_PERCENTAGE_SAMPLES behaviour as previously it did nothing
Danny Wood [Mon, 23 Dec 2019 11:37:10 +0000 (11:37 +0000)]
samsung: hidl: correct USES_PERCENTAGE_SAMPLES behaviour as previously it did nothing

This fixes fingerprint on the SM-A510F and possibly other older Samsung devices when using the new
HIDL implementation

Change-Id: Ie8883d3d628e924a9b181b08681388cd05e5f325

4 years agosamsung: remove old consumerir hal
Jan Altensen [Fri, 31 Jan 2020 14:56:59 +0000 (15:56 +0100)]
samsung: remove old consumerir hal

Change-Id: I5d6a51bf1fee6a196b11e67b267c90643831a42c

4 years agosamsung: hidl: add vibrator HAL for SEC Haptic Engine
Jesse Chan [Thu, 3 May 2018 00:09:59 +0000 (17:09 -0700)]
samsung: hidl: add vibrator HAL for SEC Haptic Engine

Change-Id: I758b40deb4e0b8bfda1aa9a24c27207d3f3d7dbe

4 years agosamsung: hidl: light: use StringPrintf
Jan Altensen [Mon, 3 Feb 2020 17:57:34 +0000 (18:57 +0100)]
samsung: hidl: light: use StringPrintf

Change-Id: I3f36a92f04b254770a768623a2d957729fa87150

4 years agohidl: consumerir: Fill in implementation for IR hal
Paul Keith [Tue, 28 Jan 2020 02:19:53 +0000 (20:19 -0600)]
hidl: consumerir: Fill in implementation for IR hal

Change-Id: I0b69cce74a6fce9bf720508c279df67c49641c49

4 years agohidl: consumerir: Update samsung_consumerir header for HIDL hal
Paul Keith [Tue, 28 Jan 2020 02:19:45 +0000 (20:19 -0600)]
hidl: consumerir: Update samsung_consumerir header for HIDL hal

Change-Id: Ife68fd0ccd65eb16241694bbf911fc6810f7dd80

4 years agohidl: consumerir: Add legacy samsung_consumerir header
Paul Keith [Tue, 28 Jan 2020 02:19:37 +0000 (20:19 -0600)]
hidl: consumerir: Add legacy samsung_consumerir header

Change-Id: I5eba753669b7c8ae6e63cb235cc16bf362c6c051

4 years agohidl: consumerir: Setup boilerplate code for HIDL hal
Paul Keith [Tue, 28 Jan 2020 02:19:30 +0000 (20:19 -0600)]
hidl: consumerir: Setup boilerplate code for HIDL hal

Change-Id: I5347b6b7d2b12f4f5ae0990503e50f22850746fb

4 years agohidl: consumerir: Add autogenerated HIDL impl and blueprint
Paul Keith [Tue, 28 Jan 2020 02:19:23 +0000 (20:19 -0600)]
hidl: consumerir: Add autogenerated HIDL impl and blueprint

* Using the commands:
 - hidl-gen -p ../.. -o hidl/consumerir -r android.hardware:hardware/interfaces android.hardware.ir@1.0 -L androidbp-impl
 - hidl-gen -p ../.. -o hidl/consumerir -r android.hardware:hardware/interfaces android.hardware.ir@1.0 -L c++-impl

Change-Id: I4079d2a7b50bdb6e9b9389892bce2a9e881db039

4 years agosamsung: Replace clang-format with symlink.
Steven Moreland [Wed, 16 Jan 2019 00:56:32 +0000 (16:56 -0800)]
samsung: Replace clang-format with symlink.

Automatic consistency.

Bug: 122835115
Test: manual
Change-Id: I6583f9f7923a822aa11f1839fbf375c1063a89c6

4 years agosamsung: move livedisplay and touch from lineagehw to hidl folder
Jan Altensen [Mon, 27 Jan 2020 23:06:47 +0000 (00:06 +0100)]
samsung: move livedisplay and touch from lineagehw to hidl folder

 * to keep all hidl things in one place

Change-Id: I91e4918191781e697b0c6c6e5cfe5dbe72ea5e59

4 years agosamsung: Remove devicesettings resources from lineage.dependencies
LuK1337 [Wed, 22 Jan 2020 23:40:21 +0000 (00:40 +0100)]
samsung: Remove devicesettings resources from lineage.dependencies

* Synced by default since LineageOS/android@9bd031c

Change-Id: I822298f856f4d1012f847a8be311310f5e51f2bb