2

I'm exploring the changes in Android M preview release 1. Specifically, I want to know if I can programmatically check to see if my app is whitelisted from Doze and App Standby mode. I basically want the result of "adb shell dumpsys deviceidle". I attempted to get the instance of android.os.IDeviceIdleController via getSystemServices but it return null. when I do "adb shell service list" I get "56 deviceidle: [android.os.IDeviceIdleController]". If I can access the instance, then I an use java reflection to access the public method isPowerSaveWhitelistApp(string name).

zmarties
  • 4,809
  • 22
  • 39
user3063925
  • 255
  • 3
  • 12
  • Source code of M preview will be helpful, but until now can't find (probably not public). Google source from branch android-m-preview doesn't corresponds M preview binary image published officially. – Jokii Jun 30 '15 at 07:33