title: Remove app from whitelist in android marshmallow
body: <p>I didn't find useful info how to programically or using device's settings remove specific app from white-listed. </p>
  
  <p>In android 6.0 was introduced doze-mode and while-listed, the last term allows ignore partially doze-mode.</p>
  
  <p>To put app in white-listed apps need to perform code:</p>
  
  <pre><code>Intent intent = new Intent();
  intent.setAction(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
  intent.setData(Uri.parse("package:" + getPackageName()));
  startActivity(intent);
  </code></pre>
  
  <p>I tried next actions to remove the app from white-listed, which it has  just been put, but nothing help me:</p>
  
  <ol>
  <li>clear data application in settings   </li>
  <li>remove application and
  install again</li>
  </ol>
  
  <p>To check current list of while-listed appы there is posibility using dumpsys</p>
  
  <pre><code> adb shell dumpsys deviceidle
  </code></pre>
  
  <p>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.</p>
  
  <p>Phone MeizuU680h. In another devices haven't tests.</p>