Fork Search code to independantly develop and test search.
This is the start of the new search in Settings. It is a nearly complete replacement of the old search code in a more modular and flexible architecture. It is expanding the datasources that it queries, including the same Settings database, which will now include more first party apps and be extended to support inline results where the user can change settings directly from the search view. Search will also fan out to query new sources (local or remote), and is built in a way such that adding additional sources is roughly the same amount of work had they been added in the initial writing of this code. Query interpretation will now be source-dependant, allowing for future upgrades to fuzzy search where it is applicable. Change-Id: Ib0bac1fe92bf8a662d33abf9a99bb6ee2090ec8f Fixes: 32115225, 32378927 Test: make RunSettingsRoboTests
This commit is contained in:
38
src/com/android/settings/search2/SearchFeatureProvider.java
Normal file
38
src/com/android/settings/search2/SearchFeatureProvider.java
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (C) 2016 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.settings.search2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.widget.SearchView;
|
||||
import android.view.Menu;
|
||||
|
||||
/**
|
||||
* FeatureProvider for Settings Search
|
||||
*/
|
||||
public interface SearchFeatureProvider {
|
||||
|
||||
/**
|
||||
* @return true to use the new version of search
|
||||
*/
|
||||
boolean isEnabled();
|
||||
|
||||
/**
|
||||
* Inserts the Menu items into Settings activity.
|
||||
* @param menu Items will be inserted into this menu.
|
||||
* @param activity The activity that precedes SearchActivity.
|
||||
*/
|
||||
void setUpSearchMenu(Menu menu, Activity activity);
|
||||
}
|
||||
Reference in New Issue
Block a user