I switched off the screen display of my Nexus 5 device running Android M and then issued the following commands.
im17-x0:~ r.j$ adb shell dumpsys battery unplug
im17-x0:~ r.j$ adb shell dumpsys deviceidle step
Stepped to: IDLE_PENDING
im17-x0:~ r.a$ adb shell dumpsys deviceidle step
Stepped to: SENSING
im17-x0:~ r.a$ adb shell dumpsys deviceidle step
Stepped to: IDLE
Now ideally my device should go to idle mode. But i started a CountDownTimer
before putting it in idle mode and its still running.
Also the network access is still there in my phone ( checked using this function)
Why is the device not going in doze mode? Following the options from here for standby mode also has the same effect. Why?
Also in that timer,if i check for isDeviceIdleMode()
, it returns true.