sm6150-common: parts: Get rid of nested PreferenceCategory

getPreferenceScreen().findPreference() does not find preferences
within another PreferenceCategory. That breaks hidin the proximity
category on devices which do not support it.

Change-Id: Ic7d840df7a71905b5b697954a279de51d8d0408a
This commit is contained in:
Arian 2023-05-18 14:34:01 +02:00
parent 4a67b5eb26
commit 0ceaa3e801

View File

@ -51,38 +51,39 @@
android:title="@string/wake_on_gesture_title" android:title="@string/wake_on_gesture_title"
android:summary="@string/wake_on_gesture_summary" /> android:summary="@string/wake_on_gesture_summary" />
<PreferenceCategory </PreferenceCategory>
android:key="pickup_sensor"
android:title="@string/pickup_sensor_title">
<SwitchPreference <PreferenceCategory
android:key="gesture_pick_up" android:key="pickup_sensor"
android:defaultValue="false" android:title="@string/pickup_sensor_title">
android:icon="@drawable/ic_doze_pickup"
android:title="@string/pick_up_gesture_title"
android:summary="@string/pick_up_gesture_summary" />
</PreferenceCategory> <SwitchPreference
android:key="gesture_pick_up"
<PreferenceCategory android:defaultValue="false"
android:key="proximity_sensor" android:icon="@drawable/ic_doze_pickup"
android:title="@string/proximity_sensor_title"> android:title="@string/pick_up_gesture_title"
android:summary="@string/pick_up_gesture_summary" />
<SwitchPreference
android:key="gesture_hand_wave"
android:defaultValue="false"
android:icon="@drawable/ic_doze_hand"
android:title="@string/hand_wave_gesture_title"
android:summary="@string/hand_wave_gesture_summary" />
<SwitchPreference
android:key="gesture_pocket"
android:defaultValue="false"
android:icon="@drawable/ic_doze_pocket"
android:title="@string/pocket_gesture_title"
android:summary="@string/pocket_gesture_summary" />
</PreferenceCategory>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory
android:key="proximity_sensor"
android:title="@string/proximity_sensor_title">
<SwitchPreference
android:key="gesture_hand_wave"
android:defaultValue="false"
android:icon="@drawable/ic_doze_hand"
android:title="@string/hand_wave_gesture_title"
android:summary="@string/hand_wave_gesture_summary" />
<SwitchPreference
android:key="gesture_pocket"
android:defaultValue="false"
android:icon="@drawable/ic_doze_pocket"
android:title="@string/pocket_gesture_title"
android:summary="@string/pocket_gesture_summary" />
</PreferenceCategory>
</PreferenceScreen> </PreferenceScreen>