Ensure AlarmManager knows of IDLE state.
AlarmManager relies on AlarmManager.setIdleUntil to know when the device is entering the IDLE state. Devices that want to use a motion sensor but don't have one normally won't proceed to the IDLE state, but someone could force the device into the IDLE state via adb. In that situation, AlarmManager should still be told that the device entered the IDLE state. The alarm scheduling method expects mState to be updated before its called, so if the method is called before the state is updated, it will do the wrong thing. Bug: 270672228 Test: atest DeviceIdleTest Test: atest FrameworksMockingServicesTests:DeviceIdleControllerTest Change-Id: I95a06e37f218bfebc86ffa6a984b50b60013af7d
Loading
Please register or sign in to comment