When dimlayer_hbm is enabled, HWC ends up disabling all color
transformations, including Night Light. Since we enable/disable
dimlayer_hbm on authenticate/cancel, this means that whenever the UDFPS
circle is present, Night Light ends up temporarily turning off. This is
especially not helpful on the lock screen, where the UDFPS circle is
active all the time.
Instead of turning on dimlayer_hbm during the entire time that the UDFPS
circle is showing, let's turn on dimlayer_hbm only when the user is
pressing down on the circle. In doing so, the color transformations will
be disabled for only when the user is touching the circle. We will still
disable dimlayer_hbm on cancel anyway, just in case that wasn't already
set to off by the time cancel() is called.
However, when enrolling a new fingerprint, the user is going to be
tapping on the UDFPS circle many, many times, and the user may prefer to
just keep dimlayer on for the entire duration. Add `isEnrolling` to
track that, and don't change dimlayer state while that is set to true.
Change-Id: I9ed1a6b5839e39b8f70ff4af4ebe8d1bc66ffb98
Signed-off-by: AnierinB <anierin@evolution-x.org>
* required for oem fast charger detection
* this forces android to display "charging rapidly" whenever our
proprietary 30w charger is connected, based on the value of
this node (0/1)
[SQUASH] martini: sepolicy: address selinux denial for oem fast charge
* 02-18 16:00:08.248 1702 1702 I HwBinder:1702_5: type=1400 audit(0.0:2401): avc: denied { open } for path="/sys/devices/virtual/oplus_chg/battery/voocchg_ing" dev="sysfs" ino=127171 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
* 02-18 15:36:04.348 1683 1683 W HwBinder:1683_5: type=1400 audit(0.0:2430): avc: denied { read } for name="voocchg_ing" dev="sysfs" ino=127167 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
There are two ways for the kernel to load iris5.fw. The first way is
via fw_get_filesystem_firmware(), which read iris5.fw directly from the
filesystem using filp_read(). The second way gets FW via ueventd, which
calls request_firmware().
Because the kernel unconditionally calls fw_get_filesystem_firmware()
for iris5, the first way always gets executed. However, the current
sepolicy denies read access to iris5.fw for the kernel, causing this way
to never work. The second way is used only on ioctl(), which would
likely be sent from HWC. Unlike the first way, the second way *does*
work as-is, and since HWC is always started when booting into Android,
we don't have to worry about the first way being broken.
However, HWC doesn't run offline charging mode, so we have to rely on
the first way for that case. Unfortunately, since the first way is
broken, offline charging fails to work properly as a result. As such, we
need to fix that denial to make the first way work again.
Change-Id: Iba43afc5dba1c64d8ced9f374bbf9f0457db3c92
For aw8697_haptic, OOS 12 never really properly implemented any effect
other than CLICK and HEAVY_CLICK. Let's implement our own TEXTURE_TICK,
TICK, CLICK, and HEAVY_CLICK so that the user can actually feel a
noticeable difference between each haptic effect.
As a quick summary:
- CLICK: same as oplus CLICK, but with vmax set to 2500.
- DOUBLE_CLICK: replaced with our CLICK played twice in a row, w/ a
100ms delay
- TICK: same as oplus CLICK, but with vmax set to 1400.
- HEAVY_CLICK: same as oplus CLICK, but with vmax set to 2500 and
waveform_index set to 4.
- TEXTURE_TICK: same as oplus CLICK, but with vmax set to 60 and
waveform_index set to 2.
In addition, modify LedVibratorDevice's on() to better reflect the
timeout duration actually being passed in to the function. The original
tried to change waveforms instead for various durations at 102 ms or
lower, which didn't really work out in practice for our vibrator.
Change-Id: Ifb769bc2292774afa4977026787a7882430c09d0
It seems that the DOUBLE_CLICK and HEAVY_CLICK effects assume that
`waveform_index` is always set to 1 and `vmax` is set to 1600, because
if the last played effect is TICK, then all the other effects (aside
from CLICK) end up feeling different, presumably because
`waveform_index` is left as set to 2 and `vmax` is left as set to 1600.
Fix this by having DOUBLE_CLICK and HEAVY_CLICK set `waveform_index`
back to 1 and `vmax` back to 1600.
Change-Id: Ic116f45894cf4af25bcd25b66764eeb472631af5