* 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)
Bug: 151818536
Test: Log can be printed as below:
I/android.hardware.thermal@2.0-service.pixel( 889): skin-therm-monitor: 50
Change-Id: Iefd24ff48ead9c2da55640742abcb158e9b181c2
Signed-off-by: TeYuan Wang <kamewang@google.com>
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>
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
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>
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
* Change I87ec20e3b0c9e9559963bebe7221f51e1dd4d7f3 made assumptions
that aren't true
Change-Id: I898362c1888ab46afbfad3ecbf8a94a70d2f6fd7
(cherry picked from commit 8f04a50d7cb945deb9da5920948f1eef8ab88857)
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
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
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