Google has redefined "idle" with Android 6.0 Marshmallow with the introduction of Doze mode. In fact, it works so efficiently that Google requires every OEM to have it included as is — without being tampered with — even with their custom Android skins running atop Marshmallow.
In previous versions of Android, apps would still be active even if the device is idle, which means they still connect to their respective servers and sync data. Thus the device would still consume a significant chunk of the available battery load — more than what users expect for an unused device.
With Marshmallow's Doze mode, however, SyncAdapter, which is mainly responsible for syncing data, Job Scheduler and Alarm Manager are paused. The feature kicks in when the device's screen is off and when it's neither charging nor moving, which it will take as a sign of inactivity.
"To be clear, Doze does not disable these services," says Jona Smith of Android Developers. "They just get deferred to a later time."
Smith explains that the tasks and background services that got halted will be resumed once the device exits Doze mode, which is when the user picks up the device again. There are also cases when the device will snap out of Doze mode and notify the user of what it classifies as important. Chat messages and set alarms will persist even through doze mode while tweets and Facebook notifications will not.
So yes, the feature is neat and that's why Google doesn't want device manufacturers to remove or modify it in their custom operating systems built on top of Marshmallow. The company made it clear in its published Compatibility Definition for Android 6.0.
"The triggering, maintenance, wakeup algorithms and the use of Global system settings of these power-saving modes MUST not deviate from the Android Open Source Project," states (pdf) section 8.3 Power-Saving Modes of the document.
Device users are also permitted to choose which apps they choose to exempt and run even through Doze mode. However, Google mandates that the exempted apps be visible and made known to the user.
"All apps exempted from App Standby and/or Doze mode MUST be made visible to the end user," says another excerpt of the document.
Below is a short video of Jona Smith, explaining how Doze Mode works and the codes that make it possible.
Photo: Takahiro Yamagiwa | Flickr