Rename EntryProvider as SpaSearchProvider

Remove GalleryEntryProvider, use SpaSearchProvider directly.

Bug: 244122804
Test: unit-test & local build gallery
Change-Id: I86c63f45dee279d98dc517bbbac292b5e0bcb3bc
This commit is contained in:
Zekan Qian
2022-11-10 16:32:13 +08:00
parent cef8c91bae
commit 98b32e0a06
5 changed files with 7 additions and 28 deletions

View File

@@ -35,8 +35,8 @@
</activity>
<provider
android:name=".GalleryEntryProvider"
android:authorities="com.android.spa.gallery.provider"
android:name="com.android.settingslib.spa.framework.SpaSearchProvider"
android:authorities="com.android.spa.gallery.search.provider"
android:enabled="true"
android:exported="false">
</provider>
@@ -51,7 +51,7 @@
</activity>
<provider
android:name="com.android.settingslib.spa.framework.debug.DebugProvider"
android:authorities="com.android.spa.gallery.debug"
android:authorities="com.android.spa.gallery.debug.provider"
android:enabled="true"
android:exported="false">
</provider>

View File

@@ -1,21 +0,0 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settingslib.spa.gallery
import com.android.settingslib.spa.framework.EntryProvider
class GalleryEntryProvider : EntryProvider()

View File

@@ -80,7 +80,7 @@ class GallerySpaEnvironment(context: Context) : SpaEnvironment(context) {
override val browseActivityClass = GalleryMainActivity::class.java
override val entryProviderAuthorities = "com.android.spa.gallery.provider"
override val searchProviderAuthorities = "com.android.spa.gallery.search.provider"
override val logger = LocalLogger()
}

View File

@@ -33,7 +33,7 @@ import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
import com.android.settingslib.spa.framework.common.addUri
import com.android.settingslib.spa.framework.common.getColumns
private const val TAG = "EntryProvider"
private const val TAG = "SpaSearchProvider"
/**
* The content provider to return entry related data, which can be used for search and hierarchy.
@@ -47,7 +47,7 @@ private const val TAG = "EntryProvider"
* $ adb shell content query --uri content://<AuthorityPath>/search_mutable_status
* $ adb shell content query --uri content://<AuthorityPath>/search_immutable_status
*/
open class EntryProvider : ContentProvider() {
class SpaSearchProvider : ContentProvider() {
private val spaEnvironment get() = SpaEnvironmentFactory.instance
private val uriMatcher = UriMatcher(UriMatcher.NO_MATCH)

View File

@@ -64,7 +64,7 @@ abstract class SpaEnvironment(context: Context) {
open val browseActivityClass: Class<out Activity>? = null
open val entryProviderAuthorities: String? = null
open val searchProviderAuthorities: String? = null
open val logger: SpaLogger = object : SpaLogger {}