From 15fd692591c7c14b57be6af69aa85f8210b7f848 Mon Sep 17 00:00:00 2001
From: Tommy Webb <tommy@calyxinstitute.org>
Date: Wed, 6 Mar 2024 05:18:02 +0530
Subject: [PATCH] ScreenOffUdfps: Update for U QPR2

Change-Id: I2664d170210b3bde68bd88b2032baed5b27ae780
---
 res/xml/screen_off_udfps_settings.xml                         | 2 +-
 src/com/android/settings/gestures/ScreenOffUdfpsSettings.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/res/xml/screen_off_udfps_settings.xml b/res/xml/screen_off_udfps_settings.xml
index f723321..1e1bddb 100644
--- a/res/xml/screen_off_udfps_settings.xml
+++ b/res/xml/screen_off_udfps_settings.xml
@@ -19,7 +19,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:title="@string/ambient_display_screen_off_udfps_title">
 
-    <SwitchPreference
+    <SwitchPreferenceCompat
         android:key="gesture_screen_off_udfps"
         android:title="@string/ambient_display_screen_off_udfps_title"
         android:summary="@string/ambient_display_screen_off_udfps_summary"
diff --git a/src/com/android/settings/gestures/ScreenOffUdfpsSettings.java b/src/com/android/settings/gestures/ScreenOffUdfpsSettings.java
index 959c0f7..763ffb6 100644
--- a/src/com/android/settings/gestures/ScreenOffUdfpsSettings.java
+++ b/src/com/android/settings/gestures/ScreenOffUdfpsSettings.java
@@ -44,7 +44,7 @@ public class ScreenOffUdfpsSettings extends DashboardFragment {
     public void onAttach(Context context) {
         super.onAttach(context);
         SuggestionFeatureProvider suggestionFeatureProvider =
-                FeatureFactory.getFactory(context).getSuggestionFeatureProvider();
+                FeatureFactory.Companion.getFeatureFactory().getSuggestionFeatureProvider();
         SharedPreferences prefs = suggestionFeatureProvider.getSharedPrefs(context);
         prefs.edit().putBoolean(PREF_KEY_SUGGESTION_COMPLETE, true).apply();
 
-- 
GitLab