Merge "Move lockscreen to using haptic feedback setting." into jb-mr1-dev

This commit is contained in:
Jeff Sharkey
2012-10-10 16:26:49 -07:00
committed by Android (Google) Code Review
4 changed files with 13 additions and 13 deletions

View File

@ -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 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 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_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 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 LOGGING_ID = "logging_id";
field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference"; field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference";

View File

@ -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 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 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_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 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 LOGGING_ID = "logging_id";
field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference"; field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference";

View File

@ -3197,10 +3197,16 @@ public final class Settings {
public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern"; 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 = @Deprecated
"lock_pattern_tactile_feedback_enabled"; 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, * This preference allows the device to be locked given time after screen goes off,

View File

@ -949,14 +949,8 @@ public class LockPatternUtils {
* @return Whether tactile feedback for the pattern is enabled. * @return Whether tactile feedback for the pattern is enabled.
*/ */
public boolean isTactileFeedbackEnabled() { public boolean isTactileFeedbackEnabled() {
return getBoolean(Settings.Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, false); return Settings.System.getIntForUser(mContentResolver,
} Settings.System.HAPTIC_FEEDBACK_ENABLED, 1, UserHandle.USER_CURRENT) != 0;
/**
* Set whether tactile feedback for the pattern is enabled.
*/
public void setTactileFeedbackEnabled(boolean enabled) {
setBoolean(Settings.Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, enabled);
} }
/** /**