Skip to content

Commit 03bd101

Browse files
jsharkeyAndroid (Google) Code Review
authored andcommitted
Merge "Move lockscreen to using haptic feedback setting." into jb-mr1-dev
2 parents 1dbce5f + 5ed9d68 commit 03bd101

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

api/17.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18905,7 +18905,7 @@ package android.provider {
1890518905
field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
1890618906
field public static final java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
1890718907
field public static final java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
18908-
field public static final java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
18908+
field public static final deprecated java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
1890918909
field public static final java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
1891018910
field public static final deprecated java.lang.String LOGGING_ID = "logging_id";
1891118911
field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference";

api/current.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18905,7 +18905,7 @@ package android.provider {
1890518905
field public static final deprecated java.lang.String INSTALL_NON_MARKET_APPS = "install_non_market_apps";
1890618906
field public static final java.lang.String LOCATION_PROVIDERS_ALLOWED = "location_providers_allowed";
1890718907
field public static final java.lang.String LOCK_PATTERN_ENABLED = "lock_pattern_autolock";
18908-
field public static final java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
18908+
field public static final deprecated java.lang.String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
1890918909
field public static final java.lang.String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
1891018910
field public static final deprecated java.lang.String LOGGING_ID = "logging_id";
1891118911
field public static final deprecated java.lang.String NETWORK_PREFERENCE = "network_preference";

core/java/android/provider/Settings.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3197,10 +3197,16 @@ public static boolean putFloatForUser(ContentResolver cr, String name, float val
31973197
public static final String LOCK_PATTERN_VISIBLE = "lock_pattern_visible_pattern";
31983198

31993199
/**
3200-
* Whether lock pattern will vibrate as user enters (0 = false, 1 = true)
3200+
* Whether lock pattern will vibrate as user enters (0 = false, 1 =
3201+
* true)
3202+
*
3203+
* @deprecated Starting in {@link VERSION_CODES#JELLY_BEAN_MR1} the
3204+
* lockscreen uses
3205+
* {@link Settings.System#HAPTIC_FEEDBACK_ENABLED}.
32013206
*/
3202-
public static final String LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED =
3203-
"lock_pattern_tactile_feedback_enabled";
3207+
@Deprecated
3208+
public static final String
3209+
LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED = "lock_pattern_tactile_feedback_enabled";
32043210

32053211
/**
32063212
* This preference allows the device to be locked given time after screen goes off,

core/java/com/android/internal/widget/LockPatternUtils.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -949,14 +949,8 @@ public void setVisiblePatternEnabled(boolean enabled) {
949949
* @return Whether tactile feedback for the pattern is enabled.
950950
*/
951951
public boolean isTactileFeedbackEnabled() {
952-
return getBoolean(Settings.Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, false);
953-
}
954-
955-
/**
956-
* Set whether tactile feedback for the pattern is enabled.
957-
*/
958-
public void setTactileFeedbackEnabled(boolean enabled) {
959-
setBoolean(Settings.Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, enabled);
952+
return Settings.System.getIntForUser(mContentResolver,
953+
Settings.System.HAPTIC_FEEDBACK_ENABLED, 1, UserHandle.USER_CURRENT) != 0;
960954
}
961955

962956
/**

0 commit comments

Comments
 (0)