Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 406a01df authored by Lorenzo Lucena Maguire's avatar Lorenzo Lucena Maguire
Browse files

Rename Double Tap Power To Open Camera Gesture Xml

Rename double_tap_power_settings.xml to
double_tap_power_to_open_camera_settings.xml

Android Settings Feature Request: b/380287172

Bug: 381554683
Test: atest DoubleTapPowerSettingsTest
Flag: android.service.quickaccesswallet.launch_wallet_option_on_power_double_tap
Change-Id: I6ff3c0384602a5f0eeeafcc560e7854af8480f99
parent 75536b09
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -18,19 +18,18 @@
<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:settings="http://schemas.android.com/apk/res-auto"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:title="@string/double_tap_power_for_camera_title">

    <com.android.settingslib.widget.IllustrationPreference
        android:key="gesture_double_tap_power_video"
        settings:searchable="false"
        app:lottie_rawRes="@drawable/quickly_open_camera"/>
        settings:lottie_rawRes="@drawable/quickly_open_camera"/>

    <SwitchPreferenceCompat
        android:key="gesture_double_tap_power"
        android:title="@string/double_tap_power_for_camera_title"
        android:summary="@string/double_tap_power_for_camera_summary"
        app:keywords="@string/keywords_gesture"
        app:controller="com.android.settings.gestures.DoubleTapPowerToOpenCameraPreferenceController"/>
        settings:keywords="@string/keywords_gesture"
        settings:controller="com.android.settings.gestures.DoubleTapPowerToOpenCameraPreferenceController"/>

</PreferenceScreen>
+2 −2
Original line number Diff line number Diff line
@@ -56,9 +56,9 @@ public class DoubleTapPowerSettings extends DashboardFragment {

    @Override
    protected int getPreferenceScreenResId() {
        return R.xml.double_tap_power_settings;
        return R.xml.double_tap_power_to_open_camera_settings;
    }

    public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
            new BaseSearchIndexProvider(R.xml.double_tap_power_settings);
            new BaseSearchIndexProvider(R.xml.double_tap_power_to_open_camera_settings);
}
+10 −2
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ import static com.google.common.truth.Truth.assertThat;

import android.provider.SearchIndexableResource;

import com.android.settings.R;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -38,6 +40,12 @@ public class DoubleTapPowerSettingsTest {
        mSettings = new DoubleTapPowerSettings();
    }

    @Test
    public void getPreferenceResId_returnsResId() {
        assertThat(mSettings.getPreferenceScreenResId())
                .isEqualTo(R.xml.double_tap_power_to_open_camera_settings);
    }

    @Test
    public void testSearchIndexProvider_shouldIndexResource() {
        final List<SearchIndexableResource> indexRes =