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

Commit a79c377f authored by Fan Zhang's avatar Fan Zhang
Browse files

Declare "searchable" attribute for preferences.

Now we can easily mark a preference nonIndexable in xml instead of
adding key into searchIndexProvider.

Bug: 112608186
Test: robotests
Change-Id: I0ff16d44bb7b6ad148d3d35f09ca0da0163f73f4
parent 097cfa72
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@
    <declare-styleable name="Preference">
        <!-- Synonyms for search results -->
        <attr name="keywords" format="string" />
        <!-- Whether or not the preference is searchable, by default it's true. -->
        <attr name="searchable" format="boolean" />
        <!-- Classname of a PreferenceController corresponding to the preference -->
        <attr name="controller" format="string" />
        <!-- {@code true} when the controller declared represents a slice from {@link android.app.SettingsSliceContract} -->
+2 −1
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@
        android:key="special_access"
        android:fragment="com.android.settings.applications.specialaccess.SpecialAccessSettings"
        android:title="@string/special_access"
        android:order="20" />
        android:order="20"
        settings:searchable="false"/>

</PreferenceScreen>
+4 −3
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
        android:key="assist_and_voice_input"
        android:title="@string/assist_and_voice_input_title"
        android:fragment="com.android.settings.applications.assist.ManageAssist"
        settings:keywords="@string/keywords_assist_input"/>
        settings:searchable="false"/>

    <com.android.settings.widget.AppPreference
        android:key="default_browser"
@@ -86,7 +86,8 @@
        <com.android.settings.widget.AppPreference
            android:key="work_default_browser"
            android:title="@string/default_browser_title"
            android:fragment="com.android.settings.applications.defaultapps.DefaultBrowserPicker">
            android:fragment="com.android.settings.applications.defaultapps.DefaultBrowserPicker"
            settings:searchable="false">
            <extra android:name="for_work" android:value="true" />
        </com.android.settings.widget.AppPreference>

@@ -94,7 +95,7 @@
            android:key="work_default_phone_app"
            android:title="@string/default_phone_title"
            android:fragment="com.android.settings.applications.defaultapps.DefaultPhonePicker"
            settings:keywords="@string/keywords_default_phone_app">
            settings:searchable="false">
            <extra android:name="for_work" android:value="true" />
        </com.android.settings.widget.AppPreference>

+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@


  <com.android.settings.widget.WorkOnlyCategory
      android:key="work_app_defaults"
      android:key="autofill_work_app_defaults"
      android:title="@string/default_for_work">

    <com.android.settings.widget.GearPreference
+2 −1
Original line number Diff line number Diff line
@@ -183,7 +183,8 @@
        <Preference
            android:key="feature_flags_dashboard"
            android:title="@string/feature_flags_dashboard_title"
            android:fragment="com.android.settings.development.featureflags.FeatureFlagsDashboard" />
            android:fragment="com.android.settings.development.featureflags.FeatureFlagsDashboard"
            settings:searchable="false" />

        <SwitchPreference
            android:key="enable_gpu_debug_layers"
Loading