<?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"
<?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.
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"
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;
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) {