Implement querySiteMapPairs for indexableProvider.
Query sitemap will return a list of pairs [parent class name, child class name]. It's up to consumer to figure out the display name later so the provider doesn't have dependency on localizing any display names. - Removed SiteMapManagerTest. We will perform the test in SettingsIntelligence instead. - Added test for the new provider in instrumentation test (robolectric doesn't recognize the new constants in framework yet) Bug: 67359411 Bug: 64938328 Test: atest Change-Id: Ia973115320e6b7c8cf84d4756db1763ae7010aed
This commit is contained in:
@@ -22,6 +22,7 @@ import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.os.Build;
|
||||
import android.provider.SearchIndexablesContract.SiteMapColumns;
|
||||
import android.support.annotation.VisibleForTesting;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
@@ -33,7 +34,7 @@ public class IndexDatabaseHelper extends SQLiteOpenHelper {
|
||||
private static final String TAG = "IndexDatabaseHelper";
|
||||
|
||||
private static final String DATABASE_NAME = "search_index.db";
|
||||
private static final int DATABASE_VERSION = 117;
|
||||
private static final int DATABASE_VERSION = 118;
|
||||
|
||||
private static final String SHARED_PREFS_TAG = "indexing_manager";
|
||||
|
||||
@@ -80,14 +81,6 @@ public class IndexDatabaseHelper extends SQLiteOpenHelper {
|
||||
String TIME_STAMP = "timestamp";
|
||||
}
|
||||
|
||||
public interface SiteMapColumns {
|
||||
String DOCID = "docid";
|
||||
String PARENT_CLASS = "parent_class";
|
||||
String CHILD_CLASS = "child_class";
|
||||
String PARENT_TITLE = "parent_title";
|
||||
String CHILD_TITLE = "child_title";
|
||||
}
|
||||
|
||||
private static final String CREATE_INDEX_TABLE =
|
||||
"CREATE VIRTUAL TABLE " + Tables.TABLE_PREFS_INDEX + " USING fts4" +
|
||||
"(" +
|
||||
|
Reference in New Issue
Block a user