Always show custom zen vis eff option

Cherry-picked from pi-dev ag/4044915
+ dnd string edits

Change-Id: I2fcbe6c527b40610f997efacb08049c07b3a6dd7
Fixes: 79538038
Bug: 78447976
Test: ZenModeViseffectsCustomPreferenceControllerTes
This commit is contained in:
Beverly
2018-05-14 14:12:38 -04:00
committed by Beverly Tai
parent 8f52258962
commit 55d6aebcc5
8 changed files with 32 additions and 88 deletions

View File

@@ -30,7 +30,6 @@ import com.android.settingslib.core.lifecycle.Lifecycle;
public class ZenModeVisEffectsCustomPreferenceController
extends AbstractZenModePreferenceController {
protected boolean mShowMenuSelected;
protected static final int INTERRUPTIVE_EFFECTS = Policy.SUPPRESSED_EFFECT_AMBIENT
| Policy.SUPPRESSED_EFFECT_PEEK
| Policy.SUPPRESSED_EFFECT_LIGHTS
@@ -43,11 +42,7 @@ public class ZenModeVisEffectsCustomPreferenceController
@Override
public boolean isAvailable() {
if (mShowMenuSelected) {
return true;
}
return areCustomOptionsSelected();
return true;
}
@Override
@@ -67,10 +62,6 @@ public class ZenModeVisEffectsCustomPreferenceController
});
}
protected void setShownByMenu(boolean shown) {
mShowMenuSelected = shown;
}
protected boolean areCustomOptionsSelected() {
boolean allEffectsSuppressed =
Policy.areAllVisualEffectsSuppressed(mBackend.mPolicy.suppressedVisualEffects);