Add settings search synonyms for touchpad.

Also fixes a bug in TrackpadTouchGestureSettings that used the wrong
preference ID for search indexing.

Bug: 300611520
Test: Verified on device
Flag: NA
Change-Id: I62ccf6d0b410be977f59f101edc5c42233d9474a
This commit is contained in:
Ben Murdoch
2024-02-16 19:14:54 +00:00
parent 3f52a6c47d
commit 59a3ed3f38
3 changed files with 8 additions and 3 deletions

View File

@@ -4362,6 +4362,10 @@
<string name="trackpad_pointer_speed">Pointer speed</string> <string name="trackpad_pointer_speed">Pointer speed</string>
<!-- Title for the button to trigger the 'touch gesture' education. [CHAR LIMIT=35] --> <!-- Title for the button to trigger the 'touch gesture' education. [CHAR LIMIT=35] -->
<string name="trackpad_touch_gesture">Learn touchpad gestures</string> <string name="trackpad_touch_gesture">Learn touchpad gestures</string>
<!-- Search keywords for "touchpad" -->
<string name="keywords_touchpad">trackpad, track pad, mouse, cursor, scroll, swipe, right click, click, pointer</string>
<!-- Search keywords for 'Bottom-right tap', the name of the touchpad setting that allows the user to click the bottom right corner of the touchpad for more options. -->
<string name="keywords_trackpad_bottom_right_tap">right click, tap</string>
<!-- Title text for 'Go home' gesture education [CHAR LIMIT=35] --> <!-- Title text for 'Go home' gesture education [CHAR LIMIT=35] -->
<string name="gesture_title_go_home">Go home</string> <string name="gesture_title_go_home">Go home</string>

View File

@@ -49,7 +49,8 @@
android:summary="@string/trackpad_bottom_right_tap_summary" android:summary="@string/trackpad_bottom_right_tap_summary"
android:icon="@drawable/ic_trackpad_bottom_right_click" android:icon="@drawable/ic_trackpad_bottom_right_click"
settings:controller="com.android.settings.inputmethod.TrackpadBottomPreferenceController" settings:controller="com.android.settings.inputmethod.TrackpadBottomPreferenceController"
android:order="30"/> android:order="30"
settings:keywords="@string/keywords_trackpad_bottom_right_tap"/>
<com.android.settings.widget.SeekBarPreference <com.android.settings.widget.SeekBarPreference
android:key="trackpad_pointer_speed" android:key="trackpad_pointer_speed"
@@ -64,4 +65,4 @@
android:title="@string/trackpad_touch_gesture" android:title="@string/trackpad_touch_gesture"
android:icon="@drawable/ic_trackpad_touch_gestures_inverse" android:icon="@drawable/ic_trackpad_touch_gestures_inverse"
settings:controller="com.android.settings.inputmethod.TouchGesturesButtonPreferenceController"/> settings:controller="com.android.settings.inputmethod.TouchGesturesButtonPreferenceController"/>
</PreferenceScreen> </PreferenceScreen>

View File

@@ -52,7 +52,7 @@ public class TrackpadTouchGestureSettings extends DashboardFragment {
} }
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
new BaseSearchIndexProvider(R.xml.trackpad_settings) { new BaseSearchIndexProvider(R.xml.trackpad_gesture_settings) {
@Override @Override
protected boolean isPageSearchEnabled(Context context) { protected boolean isPageSearchEnabled(Context context) {
return FeatureFlagUtils return FeatureFlagUtils