List of usage examples for android.provider Settings ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS
String ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS
To view the source code for android.provider Settings ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS.
Click Source Link
From source file:tm.android.chronos.activity.Chronos.java
private void checkZenModeAccess() { Couple<Boolean, Integer> result = Permissions.Instance().checkZenModeAccess(this); if (!result.getKey()) { // acces not granted, present system setting to user. // no access to do not disturb settings, request ! if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { Intent intent = new Intent(Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS); startActivityForResult(intent, 0); } // bellow version M it is transparently granted. }/*from ww w. j av a2s . com*/ }