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
Loading
Please register or sign in to comment