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

Commit 77c4aab5 authored by Jernej Virag's avatar Jernej Virag Committed by Android (Google) Code Review
Browse files

Merge "Add animation to button navigation settings page" into tm-dev

parents 9ceec097 69b895c8
Loading
Loading
Loading
Loading
+1 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -11793,7 +11793,7 @@
    <string name="assistant_corner_gesture_summary">Swipe up from a bottom corner to invoke digital assistant app.</string>
    <!-- Title text for holding a long press on Home button to invoke the digital assistant app. [CHAR LIMIT=60] -->
    <string name="assistant_long_press_home_gesture_title">Hold Home to invoke assistant</string>
    <string name="assistant_long_press_home_gesture_title">Hold Home for Assistant</string>
    <!-- Summary text for holding a long press on Home button to invoke the digital assistant app. [CHAR LIMIT=NONE] -->
    <string name="assistant_long_press_home_gesture_summary">Press and hold the Home button to invoke digital assistant app.</string>
+14 −13
Original line number Diff line number Diff line
@@ -21,10 +21,13 @@
    android:title="@string/button_navigation_settings_activity_title"
    settings:keywords="@string/keywords_button_navigation_settings">

    <PreferenceCategory
        android:key="assistant_button_navigation_category"
        android:persistent="false"
        android:title="@string/assistant_gesture_category_title">
    <!-- Animation uses embedded PNGs and lottie requires asset folder to be set despite
     embedding. -->
    <com.android.settingslib.widget.IllustrationPreference
        android:key="gesture_power_menu_video"
        settings:searchable="false"
        settings:lottie_imageAssetsFolder="button_nav_menu"
        settings:lottie_rawRes="@raw/lottie_button_nav_menu"/>

    <SwitchPreference
        android:key="assistant_long_press_home_gesture"
@@ -33,7 +36,5 @@
        settings:controller="com.android.settings.gestures.ButtonNavigationSettingsAssistController"
    />

    </PreferenceCategory>

</PreferenceScreen>
+6 −4
Original line number Diff line number Diff line
@@ -43,19 +43,21 @@ public class ButtonNavigationSettingsFragmentTest {
    }

    @Test
    public void getNonIndexableKeys_twoButtonNavigationAvailable_allKeysIndexable() {
    public void getNonIndexableKeys_twoButtonNavigationAvailable_allKeysExceptAnimIndexable() {
        addPackageToPackageManager(ApplicationProvider.getApplicationContext(),
                NAV_BAR_MODE_2BUTTON_OVERLAY);
        assertThat(ButtonNavigationSettingsFragment.SEARCH_INDEX_DATA_PROVIDER.getNonIndexableKeys(
                ApplicationProvider.getApplicationContext())).isEmpty();
                ApplicationProvider.getApplicationContext())).containsExactly(
                "gesture_power_menu_video");
    }

    @Test
    public void getNonIndexableKeys_threeButtonNavigationAvailable_allKeysIndexable() {
    public void getNonIndexableKeys_threeButtonNavigationAvailable_allKeysExceptAnimIndexable() {
        addPackageToPackageManager(ApplicationProvider.getApplicationContext(),
                NAV_BAR_MODE_3BUTTON_OVERLAY);
        assertThat(ButtonNavigationSettingsFragment.SEARCH_INDEX_DATA_PROVIDER.getNonIndexableKeys(
                ApplicationProvider.getApplicationContext())).isEmpty();
                ApplicationProvider.getApplicationContext())).containsExactly(
                "gesture_power_menu_video");
    }

    private static void addPackageToPackageManager(Context context, String pkg) {