sm6150-common: parts: Handle gestures category similar to pickup and proximity
Change-Id: I37d67cb457da7d04b83045e81693d35c58842471
This commit is contained in:
parent
0ceaa3e801
commit
6c5731d55c
@ -79,10 +79,9 @@ public class DozeSettingsFragment extends PreferenceFragment
|
|||||||
dozeEnabled && DozeUtils.isAlwaysOnEnabled(getActivity()));
|
dozeEnabled && DozeUtils.isAlwaysOnEnabled(getActivity()));
|
||||||
mDozeBrightnessPreference.setOnPreferenceChangeListener(this);
|
mDozeBrightnessPreference.setOnPreferenceChangeListener(this);
|
||||||
|
|
||||||
mWakeOnGesturePreference = (SwitchPreference) findPreference(DozeUtils.WAKE_ON_GESTURE_KEY);
|
PreferenceCategory gesturesCategory =
|
||||||
mWakeOnGesturePreference.setEnabled(dozeEnabled);
|
(PreferenceCategory) getPreferenceScreen().findPreference(
|
||||||
mWakeOnGesturePreference.setOnPreferenceChangeListener(this);
|
DozeUtils.CATEG_GESTURES);
|
||||||
|
|
||||||
PreferenceCategory pickupSensorCategory =
|
PreferenceCategory pickupSensorCategory =
|
||||||
(PreferenceCategory) getPreferenceScreen().findPreference(
|
(PreferenceCategory) getPreferenceScreen().findPreference(
|
||||||
DozeUtils.CATEG_PICKUP_SENSOR);
|
DozeUtils.CATEG_PICKUP_SENSOR);
|
||||||
@ -90,6 +89,10 @@ public class DozeSettingsFragment extends PreferenceFragment
|
|||||||
(PreferenceCategory) getPreferenceScreen().findPreference(
|
(PreferenceCategory) getPreferenceScreen().findPreference(
|
||||||
DozeUtils.CATEG_PROX_SENSOR);
|
DozeUtils.CATEG_PROX_SENSOR);
|
||||||
|
|
||||||
|
mWakeOnGesturePreference = (SwitchPreference) findPreference(DozeUtils.WAKE_ON_GESTURE_KEY);
|
||||||
|
mWakeOnGesturePreference.setEnabled(dozeEnabled);
|
||||||
|
mWakeOnGesturePreference.setOnPreferenceChangeListener(this);
|
||||||
|
|
||||||
mPickUpPreference = (SwitchPreference) findPreference(DozeUtils.GESTURE_PICK_UP_KEY);
|
mPickUpPreference = (SwitchPreference) findPreference(DozeUtils.GESTURE_PICK_UP_KEY);
|
||||||
mPickUpPreference.setEnabled(dozeEnabled);
|
mPickUpPreference.setEnabled(dozeEnabled);
|
||||||
mPickUpPreference.setOnPreferenceChangeListener(this);
|
mPickUpPreference.setOnPreferenceChangeListener(this);
|
||||||
@ -117,7 +120,7 @@ public class DozeSettingsFragment extends PreferenceFragment
|
|||||||
} else {
|
} else {
|
||||||
DozeUtils.updateDozeBrightnessIcon(getContext(), mDozeBrightnessPreference);
|
DozeUtils.updateDozeBrightnessIcon(getContext(), mDozeBrightnessPreference);
|
||||||
}
|
}
|
||||||
mWakeOnGesturePreference.setDependency(DozeUtils.ALWAYS_ON_DISPLAY);
|
gesturesCategory.setDependency(DozeUtils.ALWAYS_ON_DISPLAY);
|
||||||
pickupSensorCategory.setDependency(DozeUtils.ALWAYS_ON_DISPLAY);
|
pickupSensorCategory.setDependency(DozeUtils.ALWAYS_ON_DISPLAY);
|
||||||
proximitySensorCategory.setDependency(DozeUtils.ALWAYS_ON_DISPLAY);
|
proximitySensorCategory.setDependency(DozeUtils.ALWAYS_ON_DISPLAY);
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,7 @@ public final class DozeUtils {
|
|||||||
protected static final String ALWAYS_ON_DISPLAY = "always_on_display";
|
protected static final String ALWAYS_ON_DISPLAY = "always_on_display";
|
||||||
protected static final String DOZE_BRIGHTNESS_KEY = "doze_brightness";
|
protected static final String DOZE_BRIGHTNESS_KEY = "doze_brightness";
|
||||||
protected static final String WAKE_ON_GESTURE_KEY = "wake_on_gesture";
|
protected static final String WAKE_ON_GESTURE_KEY = "wake_on_gesture";
|
||||||
|
protected static final String CATEG_GESTURES = "gestures";
|
||||||
protected static final String CATEG_PICKUP_SENSOR = "pickup_sensor";
|
protected static final String CATEG_PICKUP_SENSOR = "pickup_sensor";
|
||||||
protected static final String CATEG_PROX_SENSOR = "proximity_sensor";
|
protected static final String CATEG_PROX_SENSOR = "proximity_sensor";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user