Dnd 'blink light' option only if phone has LED
Change-Id: Ifbc75128a9434f83839cd6b60405a03f88f4b3d3 Fixes: 77271775 Test: make ROBOTEST_FILTER=ZenModeVisEffectPreferenceControllerTest RunSettingsRoboTests -j40
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user