Skip to content
Snippets Groups Projects
Commit df35767e authored by Dhina17's avatar Dhina17
Browse files

onclite: doze: Fix up the main switch preference

- fixup of this commit 76a3a0e6

Change-Id: I05f2ad63f1e614e4f8ba51f8fe5f9291fb656d74
parent 9d3810cf
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,10 @@ public class DozeSettingsFragment extends PreferenceFragment implements
boolean dozeEnabled = DozeUtils.isDozeEnabled(getActivity());
mSwitchBar = (MainSwitchPreference) findPreference(DozeUtils.DOZE_ENABLE);
mSwitchBar.addOnSwitchChangeListener(this);
mSwitchBar.setChecked(dozeEnabled);
mWakeOnGesturePreference = (SwitchPreference) findPreference(DozeUtils.WAKE_ON_GESTURE_KEY);
mWakeOnGesturePreference.setEnabled(dozeEnabled);
mWakeOnGesturePreference.setOnPreferenceChangeListener(this);
......
......@@ -36,6 +36,8 @@ public final class DozeUtils {
private static final String DOZE_INTENT = "com.android.systemui.doze.pulse";
protected static final String DOZE_ENABLE = "doze_enable";
protected static final String WAKE_ON_GESTURE_KEY = "wake_on_gesture";
protected static final String CATEG_PROX_SENSOR = "proximity_sensor";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment