Merge "Dnd 'blink light' option only if phone has LED" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-03-30 13:16:25 +00:00
committed by Android (Google) Code Review
2 changed files with 32 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.notification;
import android.app.NotificationManager;
import android.content.Context;
import android.support.v7.preference.CheckBoxPreference;
import android.support.v7.preference.Preference;
@@ -51,6 +52,10 @@ public class ZenModeVisEffectPreferenceController
@Override
public boolean isAvailable() {
if (mEffect == NotificationManager.Policy.SUPPRESSED_EFFECT_LIGHTS) {
return mContext.getResources()
.getBoolean(com.android.internal.R.bool.config_intrusiveNotificationLed);
}
return true;
}