From e1a083a14fa80c06770aa297575e7733f1f3250c Mon Sep 17 00:00:00 2001 From: ganeshi4u Date: Fri, 26 Feb 2021 07:10:29 +0000 Subject: [PATCH] Inline fingerprint vibration switch into lockscreen fragment [2/2] @ritik-gupta : port to R Co-authored-by: ritik-gupta --- res/values/wave_strings.xml | 3 + res/xml/security_lockscreen_settings.xml | 6 ++ .../FPVibrationPreferenceController.java | 65 +++++++++++++++++++ .../security/LockscreenDashboardFragment.java | 2 + 4 files changed, 76 insertions(+) create mode 100644 src/com/android/settings/security/FPVibrationPreferenceController.java diff --git a/res/values/wave_strings.xml b/res/values/wave_strings.xml index 59ab1b92a93..77137ba26e0 100644 --- a/res/values/wave_strings.xml +++ b/res/values/wave_strings.xml @@ -190,4 +190,7 @@ Pocket detection Block screen and button inputs when device is in pocket + + Fingerprint authentication vibration + Vibrate on successful fingerprint authentication diff --git a/res/xml/security_lockscreen_settings.xml b/res/xml/security_lockscreen_settings.xml index af75cc5bc31..d99ed1861fc 100644 --- a/res/xml/security_lockscreen_settings.xml +++ b/res/xml/security_lockscreen_settings.xml @@ -57,6 +57,12 @@ android:summary="@string/lockscreen_battery_info_summary" android:defaultValue="true" /> + + createPreferenceControllers(Context controllers.add(notificationController); mOwnerInfoPreferenceController = new OwnerInfoPreferenceController(context, this); controllers.add(mOwnerInfoPreferenceController); + controllers.add(new FPVibrationPreferenceController(context)); return controllers; } @@ -137,6 +138,7 @@ public List createPreferenceControllers( controllers.add(new LockScreenNotificationPreferenceController(context)); controllers.add(new OwnerInfoPreferenceController( context, null /* fragment */)); + controllers.add(new FPVibrationPreferenceController(context)); return controllers; }