diff options
-rw-r--r-- | api/17.txt | 2 | ||||
-rw-r--r-- | api/current.txt | 2 | ||||
-rw-r--r-- | core/java/android/provider/Settings.java | 12 | ||||
-rw-r--r-- | core/java/com/android/internal/widget/LockPatternUtils.java | 10 |
4 files changed, 13 insertions, 13 deletions
@@ -18905,7 +18905,7 @@ package android.provider { field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps"; field public static final java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; field public static final java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; - field public static final java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; + field public static final deprecated java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; field public static final java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; field public static final deprecated java.lang.String LOGGING_ID = "logging_id"; field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference"; diff --git a/api/current.txt b/api/current.txt index bebd566..9af3b49 100644 --- a/api/current.txt +++ b/api/current.txt @@ -18905,7 +18905,7 @@ package android.provider { field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps"; field public static final java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed"; field public static final java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock"; - field public static final java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; + field public static final deprecated java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; field public static final java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; field public static final deprecated java.lang.String LOGGING_ID = "logging_id"; field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference"; diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 3c4a8fe..00ea873 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -3197,10 +3197,16 @@ public final class Settings { public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; /** - * Whether lock pattern will vibrate as user enters (0 = false, 1 = true) + * Whether lock pattern will vibrate as user enters (0 = false, 1 = + * true) + * + * @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the + * lockscreen uses + * {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}. */ - public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = - "lock_pattern_tactile_feedback_enabled"; + @Deprecated + public static final String + LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled"; /** * This preference allows the device to be locked given time after screen goes off, diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index d14b1ee..3f40f20 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -949,14 +949,8 @@ public class LockPatternUtils { * @return Whether tactile feedback for the pattern is enabled. */ public boolean isTactileFeedbackEnabled() { - return getBoolean(Settings.Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, false); - } - - /** - * Set whether tactile feedback for the pattern is enabled. - */ - public void setTactileFeedbackEnabled(boolean enabled) { - setBoolean(Settings.Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, enabled); + return Settings.System.getIntForUser(mContentResolver, + Settings.System.HAPTIC_FEEDBACK_ENABLED, 1, UserHandle.USER_CURRENT) != 0; } /** |