samsung: doze: Prevent a pm wakeup with a timestamp in the future
authorBrandon McAnsh <brandon.mcansh@gmail.com>
Fri, 24 Jul 2015 19:40:45 +0000 (15:40 -0400)
committerJan Altensen <info@stricted.net>
Fri, 20 Mar 2020 13:56:32 +0000 (14:56 +0100)
commit73c756d2b4c91b67895c2a11d658a8bf4a0bf25f
tree75c3a591ea3156261582f6e80dcd0a21dadbb15e
parent3198b9b632410e8793fa97c6458ac227f3c71824
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>
doze/src/com/cyanogenmod/settings/device/SamsungDozeService.java