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 :)

Change-Id: Id1a431124174571f8d0091825af2418971cfe35d
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
beanstown106
2017-10-14 23:17:23 +05:30
committed by Hưng Phan
parent f76ee81981
commit 693fa1a354
3 changed files with 33 additions and 1 deletions

View File

@@ -31,13 +31,13 @@ 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;
import java.util.ArrayList;
import java.util.List;
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class NotificationSettings extends SettingsPreferenceFragment implements Preference.OnPreferenceChangeListener{
private static final String INCALL_VIB_OPTIONS = "incall_vib_options";
private Preference mChargingLeds;
@Override
public void onCreate(Bundle icicle) {
@@ -54,6 +54,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);
}
}