Code cleanup in Zen Mode Settings

Changes in response to code review from automerged commit ag/3171711

Test: make -j40 RunSettingsRoboTests
Bug: n/a
Change-Id: I5df3db4e8ff421ca9911c84ae3f621a0e3d08092
This commit is contained in:
Beverly
2017-11-17 10:00:20 -05:00
parent 12108840a0
commit 495c646744
14 changed files with 49 additions and 46 deletions

View File

@@ -23,10 +23,11 @@ import android.support.v14.preference.SwitchPreference;
import android.support.v7.preference.Preference;
import android.util.Log;
import com.android.settingslib.core.lifecycle.Lifecycle;
public class ZenModeEventsPreferenceController extends
AbstractZenModePreferenceController implements Preference.OnPreferenceChangeListener{
public class ZenModeEventsPreferenceController extends AbstractZenModePreferenceController
implements Preference.OnPreferenceChangeListener {
protected static final String KEY = "zen_mode_events";
private final ZenModeBackend mBackend;
@@ -68,8 +69,7 @@ public class ZenModeEventsPreferenceController extends
public boolean onPreferenceChange(Preference preference, Object newValue) {
final boolean allowEvents = (Boolean) newValue;
if (ZenModeSettingsBase.DEBUG) {
Log.d(TAG, "onPrefChange allowEvents="
+ allowEvents);
Log.d(TAG, "onPrefChange allowEvents=" + allowEvents);
}
mBackend.saveSoundPolicy(Policy.PRIORITY_CATEGORY_EVENTS, allowEvents);
return true;