Remove app from whitelist in android marshmallow
Asked Answered
M

2

0

I didn't find useful info how to programically or using device's settings remove specific app from white-listed.

In android 6.0 was introduced doze-mode and while-listed, the last term allows ignore partially doze-mode.

To put app in white-listed apps need to perform code:

Intent intent = new Intent();
intent.setAction(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
intent.setData(Uri.parse("package:" + getPackageName()));
startActivity(intent);

I tried next actions to remove the app from white-listed, which it has just been put, but nothing help me:

  1. clear data application in settings
  2. remove application and install again

To check current list of while-listed appы there is posibility using dumpsys

 adb shell dumpsys deviceidle

Real help is changing package name of app. I have an opinion that if application was put to white-listed so it cannot be never removed from there.

Phone MeizuU680h. In another devices haven't tests.

Muro answered 1/6, 2017 at 13:38 Comment(5)
The user can remove apps from the whitelist by going back into the same Settings screen where they added them to the whitelist.Rawdon
I thought so too. But I was in all options of phone. Can you please add more details where I should go to disable app for white-listed. Because I didn't find such options in 'Developers Options', 'Battery performance' or 'Apps'. Where it is located.?Muro
In standard Android 7.1, it is Settings > Apps > (gear icon) > Special access > Battery optimization.Rawdon
@CommonsWare, do you know if it can be done programatically?Theocrasy
@Keselme: There is no supported way to do that -- if there were, everybody would be doing it.Rawdon
M
0

I found the solution why I didn't find disable button to remove or optimizate battery. Because such button missed in FlymeCover. The FlymeCover ignore android white-listed and use own optimization.

Muro answered 1/6, 2017 at 14:26 Comment(0)
S
1

you could add or remove from whitelist typing this on ADB shell

dumpsys deviceidle whitelist +YOUR.PACKAGE

dumpsys deviceidle whitelist -YOUR.PACKAGE

in my case I need to reboot and I don´t need Root access

Substitute answered 7/12, 2017 at 0:49 Comment(0)
M
0

I found the solution why I didn't find disable button to remove or optimizate battery. Because such button missed in FlymeCover. The FlymeCover ignore android white-listed and use own optimization.

Muro answered 1/6, 2017 at 14:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.