* Move fingerprint HIDL to 2.3
* Remove Lineage FOD HIDL
[Linux4: Autodetect if fingerprint is udfps]
Change-Id: I8c628d2ee9158b45eeb04dd324b56ef3697296b7
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
Some devices have extra pointers in this structure that if non-zero
causes libsec-ril.so to segfault
Change-Id: I9fd07a4747ef0fb1388ebbec472f2dda8dea4003
* The patch was merged pre-maturely before r-perf-profiles topic got merged. Lets wait properly this time and be patient.
This reverts commit c50258fca0.
Change-Id: I60129f3886b9ab570a3d19b1e4cef9084ab87533
* also change NOT_INTERACTIVE to INTERACTIVE so it can be used with
fallthrough
Signed-off-by: Michael Benedict <michaelbt@live.com>
Change-Id: I1af27d2503b98bd873c8fe84a1028cd46e7a4a53
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
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
* 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
* 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
Maybe it is just a leftover, but these permissions are certainly
not needed for the current doze implementation.
Change-Id: I9bc83eee591e0a8c258a5fa8b8443652729aeaa4
* 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
* 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
* 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
Replicate what Google did for SystemUI in this commit.
fabc743bcf
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
* 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
* From P onward samsung changed the socket name in libsec-ril.so from
Multiclient to VND_Multiclient.
* In order to not break compatibility with older RIL stack guard this
behind TARGET_USES_VND_SECRIL.
* This is mostly relevant when using P (or newer) prebuilt ril stack
coupled with OSS audio hal from hw/samsung, which depends on OSS
libsecril-client to provide connection to the RIL daemon.
Change-Id: Iab5d07f2301d33216bbdf3e18f844522e32fadce
(cherry picked from commit 6d6c0500f3139f84163eefefc8e19dcc934ef26a)