Taking into account when the device is entering or exiting the power save mode is higly desirable for the battery life.

It implies the existence of a broadcast receiver registered on the action ACTION_POWER_SAVE_MODE_CHANGED, or programmaticaly with a call to PowerManager#isPowerSaveMode().

Compliant Code Example

new IntentFilter(Intent.ACTION_POWER_SAVE_MODE_CHANGED)

Or

intentFilter.addAction(ACTION_POWER_SAVE_MODE_CHANGED)

Or

IntentFilter.create(ACTION_POWER_SAVE_MODE_CHANGED,"")

Or

powerManager.isPowerSaveMode()