MotoActions: Convert to SwitchPreferenceCompat
authorMichael Bestas <mkbestas@gmail.com>
Fri, 8 Mar 2024 18:15:39 +0000 (20:15 +0200)
committerMichael Bestas <mkbestas@lineageos.org>
Sun, 10 Mar 2024 20:46:10 +0000 (22:46 +0200)
Change-Id: Ic1cbaba37d499da1855af9c3930f2df426e2d3af

MotoActions/res/xml/actions_panel.xml
MotoActions/res/xml/doze_panel.xml
MotoActions/src/org/lineageos/settings/device/DozePreferenceFragment.java

index edf70564b5ef0bd864b9ec1995586b2ec01ec91a..2fc32b903487bde16322fea89be93d62a9c1a3a7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
      Copyright (C) 2015-2016 The CyanogenMod Project
-     Copyright (C) 2017,2022 The LineageOS Project
+     Copyright (C) 2017-2024 The LineageOS Project
 
      Licensed under the Apache License, Version 2.0 (the "License"
      you may not use this file except in compliance with the License.
     <PreferenceCategory
         android:key="actions_key">
 
-        <SwitchPreference
+        <SwitchPreferenceCompat
             android:key="gesture_chop_chop"
             android:defaultValue="true"
             android:title="@string/chop_chop_gesture_title"
             android:summary="@string/chop_chop_gesture_summary"
             android:icon="@drawable/ic_settings_chop" />
 
-        <SwitchPreference
+        <SwitchPreferenceCompat
             android:key="gesture_ir_silencer"
             android:defaultValue="false"
             android:title="@string/hand_wave_silencer_title"
             android:summary="@string/hand_wave_silencer_summary"
             android:icon="@drawable/ic_settings_wave" />
 
-        <SwitchPreference
+        <SwitchPreferenceCompat
             android:key="gesture_flip_to_mute"
             android:defaultValue="false"
             android:title="@string/flip_to_mute_title"
             android:summary="@string/flip_to_mute_summary"
             android:icon="@drawable/ic_settings_flip" />
 
-        <SwitchPreference
+        <SwitchPreferenceCompat
             android:key="gesture_lift_to_silence"
             android:defaultValue="false"
             android:title="@string/lift_to_silence_title"
index 08333b87e85c619467f54810b3da7c6485b6cd49..b57c8c4bfb30a7d971162a3164fb0e87be805407 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-     Copyright (C) 2017-2022 The LineageOS Project
+     Copyright (C) 2017-2024 The LineageOS Project
 
      Licensed under the Apache License, Version 2.0 (the "License"
      you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
         android:key="doze_enable"
         android:title="@string/ambient_display_enable_title" />
 
-    <SwitchPreference
+    <SwitchPreferenceCompat
         android:key="always_on_display"
         android:disableDependentsState="true"
         android:title="@string/ambient_display_always_on_title"
         android:key="ambient_display_key"
         android:title="@string/ambient_display_title">
 
-        <SwitchPreference
+        <SwitchPreferenceCompat
             android:key="gesture_pick_up"
             android:defaultValue="true"
             android:title="@string/pick_up_gesture_title"
             android:summary="@string/pick_up_gesture_summary"
             android:icon="@drawable/ic_pickup" />
 
-        <SwitchPreference
+        <SwitchPreferenceCompat
             android:key="gesture_hand_wave"
             android:defaultValue="true"
             android:title="@string/hand_wave_gesture_title"
             android:summary="@string/hand_wave_gesture_summary"
             android:icon="@drawable/ic_hand" />
 
-        <SwitchPreference
+        <SwitchPreferenceCompat
             android:key="gesture_pocket"
             android:defaultValue="true"
             android:title="@string/pocket_gesture_title"
index bc6b05fa42892871fe6a9d4053ef812b9c4f3a91..f18afa03859faa14206d538d9a09aed81215221c 100644 (file)
@@ -30,7 +30,7 @@ import android.widget.CompoundButton.OnCheckedChangeListener;
 import androidx.preference.Preference;
 import androidx.preference.PreferenceCategory;
 import androidx.preference.PreferenceFragment;
-import androidx.preference.SwitchPreference;
+import androidx.preference.SwitchPreferenceCompat;
 
 import com.android.settingslib.widget.MainSwitchPreference;
 
@@ -39,11 +39,11 @@ public class DozePreferenceFragment extends PreferenceFragment
 
     private MainSwitchPreference mSwitchBar;
 
-    private SwitchPreference mAlwaysOnDisplayPreference;
+    private SwitchPreferenceCompat mAlwaysOnDisplayPreference;
 
-    private SwitchPreference mHandwavePreference;
-    private SwitchPreference mPickUpPreference;
-    private SwitchPreference mPocketPreference;
+    private SwitchPreferenceCompat mHandwavePreference;
+    private SwitchPreferenceCompat mPickUpPreference;
+    private SwitchPreferenceCompat mPocketPreference;
 
     @Override
     public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {