Fixes the search page not working on Android Kitkat (searching applications instead of accounts and tags).

This commit is contained in:
Vavassor 2017-07-16 22:31:40 -04:00
parent 8e30915e92
commit 408d38102d
2 changed files with 0 additions and 10 deletions

View file

@ -1,9 +1,6 @@
apply plugin: 'com.android.application'
android {
signingConfigs {
}
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {

View file

@ -147,14 +147,7 @@ public class SearchActivity extends BaseActivity implements SearchView.OnQueryTe
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
if (searchManager != null) {
List<SearchableInfo> searchables = searchManager.getSearchablesInGlobalSearch();
SearchableInfo searchableInfo = searchManager.getSearchableInfo(getComponentName());
for (SearchableInfo info : searchables) {
if (info.getSuggestAuthority() != null
&& info.getSuggestAuthority().startsWith("applications")) {
searchableInfo = info;
}
}
searchView.setSearchableInfo(searchableInfo);
}