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

Commit 8e73ebe7 authored by Binyi Wu's avatar Binyi Wu Committed by Android (Google) Code Review
Browse files

Merge "Update columns and AndroidManifest for SPA search"

parents 265e2bf8 09d1d69f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -38,7 +38,12 @@
        <provider
            android:name="com.android.settingslib.spa.search.SpaSearchProvider"
            android:authorities="com.android.spa.gallery.search.provider"
            android:exported="false">
            android:exported="true"
            android:grantUriPermissions="true"
            android:permission="android.permission.READ_SEARCH_INDEXABLES">
            <intent-filter>
                <action android:name="android.content.action.SPA_SEARCH_PROVIDER" />
            </intent-filter>
        </provider>

        <provider android:name="com.android.settingslib.spa.slice.SpaSliceProvider"
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ enum class QueryEnum(
            ColumnEnum.SEARCH_PATH,
            ColumnEnum.INTENT_TARGET_PACKAGE,
            ColumnEnum.INTENT_TARGET_CLASS,
            ColumnEnum.INTENT_EXTRAS,
            ColumnEnum.SLICE_URI,
            ColumnEnum.LEGACY_KEY
        )
+8 −0
Original line number Diff line number Diff line
@@ -40,6 +40,14 @@ class SpaSearchProviderTest {
    private val searchProvider = SpaSearchProvider()
    private val pageOwner = spaEnvironment.createPage("SppForSearch")

    @Test
    fun testQueryColumnSetup() {
        Truth.assertThat(QueryEnum.SEARCH_STATIC_DATA_QUERY.columnNames)
            .containsExactlyElementsIn(QueryEnum.SEARCH_DYNAMIC_DATA_QUERY.columnNames)
        Truth.assertThat(QueryEnum.SEARCH_MUTABLE_STATUS_DATA_QUERY.columnNames)
            .containsExactlyElementsIn(QueryEnum.SEARCH_IMMUTABLE_STATUS_DATA_QUERY.columnNames)
    }

    @Test
    fun testQuerySearchStatusData() {
        SpaEnvironmentFactory.reset(spaEnvironment)