Add animation to button navigation settings page
This animation was missing in the original changelist and has now been created by the UX team. Bug: 191888710 Test: Physical device Change-Id: Iefb3f0e80f4763f1358706e9dbc84a29e1f04b23
This commit is contained in:
		
							
								
								
									
										1
									
								
								res/raw/lottie_button_nav_menu.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								res/raw/lottie_button_nav_menu.json
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -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>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -21,19 +21,20 @@
 | 
			
		||||
    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"
 | 
			
		||||
            android:title="@string/assistant_long_press_home_gesture_title"
 | 
			
		||||
            android:summary="@string/assistant_long_press_home_gesture_summary"
 | 
			
		||||
            settings:controller="com.android.settings.gestures.ButtonNavigationSettingsAssistController"
 | 
			
		||||
        />
 | 
			
		||||
 | 
			
		||||
    </PreferenceCategory>
 | 
			
		||||
    <SwitchPreference
 | 
			
		||||
        android:key="assistant_long_press_home_gesture"
 | 
			
		||||
        android:title="@string/assistant_long_press_home_gesture_title"
 | 
			
		||||
        android:summary="@string/assistant_long_press_home_gesture_summary"
 | 
			
		||||
        settings:controller="com.android.settings.gestures.ButtonNavigationSettingsAssistController"
 | 
			
		||||
    />
 | 
			
		||||
 | 
			
		||||
</PreferenceScreen>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user