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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user