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
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>
* Allow user to disable ambient display from gesture panel
* Disable/enable doze settings based on ambient display state
Change-Id: I0ff7686ccc04037b3ada9a8355384ba6746cf30c
* 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
This fixes fingerprint on the SM-A510F and possibly other older Samsung devices when using the new
HIDL implementation
Change-Id: Ie8883d3d628e924a9b181b08681388cd05e5f325
Add libprocessgroup dependency to audio hal that uses set_sched_policy.
Include sched_policy_ctrl.h header which now contains set_sched_policy
definition.
Exempt-From-Owner-Approval: janitorial
Bug: 111307099
Test: builds, boots
Change-Id: I8286daed7065c405ca06e87c1b8f6f6c301dc388
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Tuned the Binder buffer to 500KB as it is not
going to use the default allocated 1MB which
saves RAM for 32 bit processors.
Change-Id: Ifea2720f8e853643a37912c3459e923168677b1e
CRs-Fixed: 2283052
* I want my target-files built images to be Loki'd if the device
needs Loki.
* With this, devices that rely on Loki can ship Lineage Recovery
officially.
* Import loki_tool from: https://github.com/Stricted/android_external_loki.
Change-Id: I45ef363e05566268c8f24f7e8939a2d785478fbe
Required because the lights need to be turned off late in boot
(e.x. during fsck for disk health), and before, blank_screen
accessing light encountered a race condition where if it didn't
get scheduled before all of the processes which were getting
shutdown were getting killed, the screen wouldn't blank.
Bug: 74976325
Test: adjusting brightness continues to work
Test: screen blanks during shutdown at the correct time
including when an artificial 5s delay is inserted when
the phone normally fscks (which can also be quick)
Change-Id: I57ebc11d7ecf57ee327c681455712f4b53de6fd3
So that init knows how to start it and to provide
an example of how to specify interfaces since there
are no lazy starting services on Pixel yet.
In order to make lights a lazy service, it would also
have to be marked as 'oneshot'.
Test: manually using Light as a lazy service
Bug: 64678982
Change-Id: I846a7e2d9545b42af9b985adb74883bda1b8c355