diff options
author | AdrianDC <radian.dc@gmail.com> | 2015-10-17 23:20:51 +0200 |
---|---|---|
committer | AdrianDC <radian.dc@gmail.com> | 2015-10-30 20:38:37 +0100 |
commit | 93a640d713c68b674894ae290abedafacb0db9cf (patch) | |
tree | 874b171cc4c3bfe925831560258993468568a8c1 | |
parent | 22b88d5483065355543a12872762c1e9ac8ecc59 (diff) | |
download | packages_apps_Settings-93a640d713c68b674894ae290abedafacb0db9cf.zip packages_apps_Settings-93a640d713c68b674894ae290abedafacb0db9cf.tar.gz packages_apps_Settings-93a640d713c68b674894ae290abedafacb0db9cf.tar.bz2 |
HighTouchSensitivity [2/2]: Add Settings preference
* Allows the HighTouchSensitivity (Glove mode)
value to be saved in the CMSettings provider
* Can be used in a device specific service to handle
the Glove mode in a way closer to the device's vendor
* Changes include :
android_packages_apps_Settings
cm_platform_sdk
Change-Id: If57bbfddbed1324fcb8488ef5a03ff242a128ba3
Signed-off-by: AdrianDC <radian.dc@gmail.com>
-rw-r--r-- | src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java index 7d9547a..5314155 100644 --- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java +++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java @@ -66,6 +66,7 @@ import com.android.settings.search.Indexable; import com.android.settings.search.SearchIndexableRaw; import cyanogenmod.hardware.CMHardwareManager; +import cyanogenmod.providers.CMSettings; import java.text.Collator; import java.util.ArrayList; @@ -414,10 +415,14 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment } if (preference == mStylusIconEnabled) { Settings.System.putInt(getActivity().getContentResolver(), - Settings.System.STYLUS_ICON_ENABLED, mStylusIconEnabled.isChecked() ? 1 : 0); + Settings.System.STYLUS_ICON_ENABLED, mStylusIconEnabled.isChecked() ? 1 : 0); } else if (preference == mHighTouchSensitivity) { + boolean mHighTouchSensitivityEnable = mHighTouchSensitivity.isChecked(); + CMSettings.System.putInt(getActivity().getContentResolver(), + CMSettings.System.HIGH_TOUCH_SENSITIVITY_ENABLE, + mHighTouchSensitivityEnable ? 1 : 0); return mHardware.set(CMHardwareManager.FEATURE_HIGH_TOUCH_SENSITIVITY, - mHighTouchSensitivity.isChecked()); + mHighTouchSensitivityEnable); } else if (preference == mTouchscreenHovering) { return mHardware.set(CMHardwareManager.FEATURE_TOUCH_HOVERING, mTouchscreenHovering.isChecked()); |