Evolver: Fingerprint authentication vibration [2/2]

Signed-off-by: AnierinB <anierin@evolution-x.org>
This commit is contained in:
Pranav Vashi
2024-05-22 16:44:08 +09:00
committed by Joey Huab
parent 405df016e5
commit dc8072ccf1
3 changed files with 22 additions and 0 deletions

View File

@@ -98,6 +98,10 @@
<string name="lock_screen_fingerprint_ripple_summary">Show ripple animation when unlocked with fingerprint</string>
<string name="lock_screen_screen_off_udfps_title">Screen-Off UDFPS</string>
<string name="lock_screen_screen_off_udfps_summary">Keep UDFPS enabled while the screen is off</string>
<string name="lock_screen_fingerprint_success_vibration_title">Authentication success vibration</string>
<string name="lock_screen_fingerprint_success_vibration_summary">Vibrate when fingerprint authentication is successful</string>
<string name="lock_screen_fingerprint_error_vibration_title">Authentication error vibration</string>
<string name="lock_screen_fingerprint_error_vibration_summary">Vibrate when fingerprint authentication fails</string>
<!-- Status bar -->
<string name="status_bar_gestures_category">Gestures</string>

View File

@@ -38,5 +38,19 @@
android:title="@string/lock_screen_screen_off_udfps_title"
android:summary="@string/lock_screen_screen_off_udfps_summary"
android:defaultValue="false" />
<!-- Authentication success vibration -->
<org.evolution.settings.preferences.SystemSettingSwitchPreference
android:key="fp_success_vibrate"
android:title="@string/lock_screen_fingerprint_success_vibration_title"
android:summary="@string/lock_screen_fingerprint_success_vibration_summary"
android:defaultValue="true" />
<!-- Authentication error vibration -->
<org.evolution.settings.preferences.SystemSettingSwitchPreference
android:key="fp_error_vibrate"
android:title="@string/lock_screen_fingerprint_error_vibration_title"
android:summary="@string/lock_screen_fingerprint_error_vibration_summary"
android:defaultValue="true" />
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -36,6 +36,8 @@ public class LockScreen extends SettingsPreferenceFragment implements
private static final String KEY_FINGERPRINT_CATEGORY = "lock_screen_fingerprint_category";
private static final String KEY_RIPPLE_EFFECT = "enable_ripple_effect";
private static final String KEY_SCREEN_OFF_UDFPS = "screen_off_udfps_enabled";
private static final String KEY_AUTHENTICATION_SUCCESS = "fp_success_vibrate";
private static final String KEY_AUTHENTICATION_ERROR = "fp_error_vibrate";
private PreferenceCategory mFingerprintCategory;
private SecureSettingSwitchPreference mScreenOffUdfps;
@@ -96,6 +98,8 @@ public class LockScreen extends SettingsPreferenceFragment implements
if (fingerprintManager == null || !fingerprintManager.isHardwareDetected()) {
keys.add(KEY_RIPPLE_EFFECT);
keys.add(KEY_SCREEN_OFF_UDFPS);
keys.add(KEY_AUTHENTICATION_SUCCESS);
keys.add(KEY_AUTHENTICATION_ERROR);
} else {
boolean screenOffUdfpsAvailable = resources.getBoolean(
com.android.internal.R.bool.config_supportScreenOffUdfps) ||