Everything seems to point to these two commands:
adb shell dumpsys battery unplug
adb shell dumpsys deviceidle step
I followed the instructions on my Nexus 6 running the Marshmallow official release. I plug in my phone to my test machine. I set up my app for testing the piece I want to test with doze. I turn off my screen. After running battery unplug
above I get no output so I assume it works, but every time I run deviceidle step
the output is always Stepped to: ACTIVE
.
I'm not sure if it matters, but the particular feature of my app I'm trying to test is an alarm I'm setting that should wake the phone out of Doze. I'm wanting my device to be mid-doze when my PendingIntent
scheduled by AlarmManager.setAlarmClock
goes off. Could that prevent my device from entering Doze?
setAlarmClock()
reportedly blocks Doze mode for a window of time before the event goes off. – BlythesetAlarmClock()
are unaffected by Doze, but I haven't read anything about this "pre-awaking" window before the alarm goes off. Is there a link about those specifics? – Aerometer