Move lockscreen to using haptic feedback setting.
This removes lockscreen-specific "Vibrate on touch" setting, and changes it to use the haptic feedback setting instead. Bug: 7318772 Change-Id: Id6931903b3ebeca6aeacef9b127490a381cd40b4
This commit is contained in:
@@ -51,10 +51,6 @@
|
|||||||
android:key="power_button_instantly_locks"
|
android:key="power_button_instantly_locks"
|
||||||
android:title="@string/lockpattern_settings_enable_power_button_instantly_locks"/>
|
android:title="@string/lockpattern_settings_enable_power_button_instantly_locks"/>
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="unlock_tactile_feedback"
|
|
||||||
android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
|
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="choose_lockscreen_status_widget"
|
android:key="choose_lockscreen_status_widget"
|
||||||
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
||||||
|
@@ -42,10 +42,6 @@
|
|||||||
android:key="power_button_instantly_locks"
|
android:key="power_button_instantly_locks"
|
||||||
android:title="@string/lockpattern_settings_enable_power_button_instantly_locks"/>
|
android:title="@string/lockpattern_settings_enable_power_button_instantly_locks"/>
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="unlock_tactile_feedback"
|
|
||||||
android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
|
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="choose_lockscreen_status_widget"
|
android:key="choose_lockscreen_status_widget"
|
||||||
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
||||||
|
@@ -38,10 +38,6 @@
|
|||||||
android:key="power_button_instantly_locks"
|
android:key="power_button_instantly_locks"
|
||||||
android:title="@string/lockpattern_settings_enable_power_button_instantly_locks"/>
|
android:title="@string/lockpattern_settings_enable_power_button_instantly_locks"/>
|
||||||
|
|
||||||
<CheckBoxPreference
|
|
||||||
android:key="unlock_tactile_feedback"
|
|
||||||
android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
|
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="choose_lockscreen_status_widget"
|
android:key="choose_lockscreen_status_widget"
|
||||||
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
android:title="@string/choose_lockscreen_status_widget_picker_title"
|
||||||
|
@@ -521,7 +521,6 @@ public class ChooseLockPattern extends PreferenceActivity {
|
|||||||
|
|
||||||
if (lockVirgin) {
|
if (lockVirgin) {
|
||||||
utils.setVisiblePatternEnabled(true);
|
utils.setVisiblePatternEnabled(true);
|
||||||
utils.setTactileFeedbackEnabled(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getActivity().setResult(RESULT_FINISHED);
|
getActivity().setResult(RESULT_FINISHED);
|
||||||
|
@@ -71,7 +71,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
private static final String KEY_BIOMETRIC_WEAK_LIVELINESS = "biometric_weak_liveliness";
|
private static final String KEY_BIOMETRIC_WEAK_LIVELINESS = "biometric_weak_liveliness";
|
||||||
private static final String KEY_LOCK_ENABLED = "lockenabled";
|
private static final String KEY_LOCK_ENABLED = "lockenabled";
|
||||||
private static final String KEY_VISIBLE_PATTERN = "visiblepattern";
|
private static final String KEY_VISIBLE_PATTERN = "visiblepattern";
|
||||||
private static final String KEY_TACTILE_FEEDBACK_ENABLED = "unlock_tactile_feedback";
|
|
||||||
private static final String KEY_SECURITY_CATEGORY = "security_category";
|
private static final String KEY_SECURITY_CATEGORY = "security_category";
|
||||||
private static final String KEY_DEVICE_ADMIN_CATEGORY = "device_admin_category";
|
private static final String KEY_DEVICE_ADMIN_CATEGORY = "device_admin_category";
|
||||||
private static final String KEY_LOCK_AFTER_TIMEOUT = "lock_after_timeout";
|
private static final String KEY_LOCK_AFTER_TIMEOUT = "lock_after_timeout";
|
||||||
@@ -105,7 +104,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
private CheckBoxPreference mBiometricWeakLiveliness;
|
private CheckBoxPreference mBiometricWeakLiveliness;
|
||||||
private CheckBoxPreference mVisiblePattern;
|
private CheckBoxPreference mVisiblePattern;
|
||||||
private CheckBoxPreference mTactileFeedback;
|
|
||||||
|
|
||||||
private CheckBoxPreference mShowPassword;
|
private CheckBoxPreference mShowPassword;
|
||||||
|
|
||||||
@@ -222,16 +220,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// tactile feedback. Should be common to all unlock preference screens.
|
|
||||||
mTactileFeedback = (CheckBoxPreference) root.findPreference(KEY_TACTILE_FEEDBACK_ENABLED);
|
|
||||||
if (!((Vibrator) getSystemService(Context.VIBRATOR_SERVICE)).hasVibrator()) {
|
|
||||||
PreferenceGroup securityCategory = (PreferenceGroup)
|
|
||||||
root.findPreference(KEY_SECURITY_CATEGORY);
|
|
||||||
if (securityCategory != null && mTactileFeedback != null) {
|
|
||||||
securityCategory.removePreference(mTactileFeedback);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mUserSelectedWidget = root.findPreference(KEY_CHOOSE_LOCKSCREEN_STATUS_WIDGET);
|
mUserSelectedWidget = root.findPreference(KEY_CHOOSE_LOCKSCREEN_STATUS_WIDGET);
|
||||||
if (mUserSelectedWidget != null) {
|
if (mUserSelectedWidget != null) {
|
||||||
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity());
|
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity());
|
||||||
@@ -469,9 +457,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
if (mVisiblePattern != null) {
|
if (mVisiblePattern != null) {
|
||||||
mVisiblePattern.setChecked(lockPatternUtils.isVisiblePatternEnabled());
|
mVisiblePattern.setChecked(lockPatternUtils.isVisiblePatternEnabled());
|
||||||
}
|
}
|
||||||
if (mTactileFeedback != null) {
|
|
||||||
mTactileFeedback.setChecked(lockPatternUtils.isTactileFeedbackEnabled());
|
|
||||||
}
|
|
||||||
if (mPowerButtonInstantlyLocks != null) {
|
if (mPowerButtonInstantlyLocks != null) {
|
||||||
mPowerButtonInstantlyLocks.setChecked(lockPatternUtils.getPowerButtonInstantlyLocks());
|
mPowerButtonInstantlyLocks.setChecked(lockPatternUtils.getPowerButtonInstantlyLocks());
|
||||||
}
|
}
|
||||||
@@ -608,8 +593,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
lockPatternUtils.setLockPatternEnabled(isToggled(preference));
|
lockPatternUtils.setLockPatternEnabled(isToggled(preference));
|
||||||
} else if (KEY_VISIBLE_PATTERN.equals(key)) {
|
} else if (KEY_VISIBLE_PATTERN.equals(key)) {
|
||||||
lockPatternUtils.setVisiblePatternEnabled(isToggled(preference));
|
lockPatternUtils.setVisiblePatternEnabled(isToggled(preference));
|
||||||
} else if (KEY_TACTILE_FEEDBACK_ENABLED.equals(key)) {
|
|
||||||
lockPatternUtils.setTactileFeedbackEnabled(isToggled(preference));
|
|
||||||
} else if (KEY_POWER_INSTANTLY_LOCKS.equals(key)) {
|
} else if (KEY_POWER_INSTANTLY_LOCKS.equals(key)) {
|
||||||
lockPatternUtils.setPowerButtonInstantlyLocks(isToggled(preference));
|
lockPatternUtils.setPowerButtonInstantlyLocks(isToggled(preference));
|
||||||
} else if (preference == mShowPassword) {
|
} else if (preference == mShowPassword) {
|
||||||
|
Reference in New Issue
Block a user