Skip to content
Commit b88801a2 authored by Kweku Adams's avatar Kweku Adams
Browse files

Fix StationaryListener updating.

Quick Doze bypasses motion detection, so if the device moves, the device
will stay in Doze without resetting the motion sensor registration
*for Doze*. If there's a StationaryListener registered,
DeviceIdleController will set a new motion sensor registration ~5
minutes after motion is detected. However, DIC doesn't consider the
device stationary unless there's been no motion for at least 10 minutes
(and the motion sensor registration has been active for the past 10
minutes), so setting the motion timeout alarm to be 10 minutes after the
motion recent motion event (which ends up being 5 minutes after DIC
re-registers the motion sensor) will result in StationaryListeners being
told the device is not stationary if the device is stationary long
enough after a previous motion event.

Bug: 231779749
Test: atest FrameworksMockingServicesTests:DeviceIdleControllerTest
Change-Id: I452e76a4fd5513ff290f89e87182016fa93c1307
parent b6da699d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment