Cherish: Incall vibration options [3/3]

* allow setting vibration when call is connected
* allow setting vibration when call is disconnected
* allow setting vibration for call waiting
* this works with google and aosp dialer :)
SuperDroidBond-: Make it default on

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
beanstown106
2018-09-06 22:52:55 +05:30
committed by Hưng Phan
parent 9792412040
commit 58affb0a08
3 changed files with 37 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ import com.cherish.settings.preferences.CustomSeekBarPreference;
import com.cherish.settings.preferences.SystemSettingListPreference;
import com.cherish.settings.preferences.SystemSettingSwitchPreference;
import net.margaritov.preference.colorpicker.ColorPickerPreference;
import com.android.internal.util.cherish.CherishUtils;
public class NotificationSettings extends SettingsPreferenceFragment implements Preference.OnPreferenceChangeListener{
@@ -27,6 +28,7 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
private static final String AMBIENT_LIGHT_DURATION = "ambient_light_duration";
private static final String AMBIENT_LIGHT_REPEAT_COUNT = "ambient_light_repeat_count";
private static final String PULSE_COLOR_MODE_PREF = "ambient_notification_light_color_mode";
private static final String INCALL_VIB_OPTIONS = "incall_vib_options";
private Preference mChargingLeds;
private ColorPickerPreference mEdgeLightColorPreference;
@@ -48,6 +50,11 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
com.android.internal.R.bool.config_intrusiveBatteryLed)) {
prefScreen.removePreference(mChargingLeds);
}
PreferenceCategory incallVibCategory = (PreferenceCategory) findPreference(INCALL_VIB_OPTIONS);
if (!CherishUtils.isVoiceCapable(getActivity())) {
prefScreen.removePreference(incallVibCategory);
}
mEdgeLightRepeatCountPreference = (SystemSettingSeekBarPreference) findPreference(AMBIENT_LIGHT_REPEAT_COUNT);
mEdgeLightRepeatCountPreference.setOnPreferenceChangeListener(this);