Fixes the search page not working on Android Kitkat (searching applications instead of accounts and tags).
This commit is contained in:
parent
8e30915e92
commit
408d38102d
@ -1,9 +1,6 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
signingConfigs {
|
||||
|
||||
}
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "25.0.3"
|
||||
defaultConfig {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user