title: Testing doze and standby mode
body: <p>I switched off the screen display of my Nexus 5 device running Android M and then issued the following commands.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Now ideally my device should go to idle mode. But i started a <code>CountDownTimer</code> before putting it in idle mode and its still running.
  Also the network access is still there in my phone ( checked using <a href="http://pastebin.com/nBuh2UVV" rel="nofollow">this</a> function)</p>
  
  <p>Why is the device not going in doze mode? Following the options from <a href="https://developer.android.com/preview/testing/guide.html#doze-standby" rel="nofollow">here</a> for standby mode also has the same effect. Why?</p>
  
  <p>Also in that timer,if i check for <code>isDeviceIdleMode()</code>, it returns true.</p>