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
2 changed files with 0 additions and 10 deletions
|
@ -1,9 +1,6 @@
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
signingConfigs {
|
|
||||||
|
|
||||||
}
|
|
||||||
compileSdkVersion 25
|
compileSdkVersion 25
|
||||||
buildToolsVersion "25.0.3"
|
buildToolsVersion "25.0.3"
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -147,14 +147,7 @@ public class SearchActivity extends BaseActivity implements SearchView.OnQueryTe
|
||||||
|
|
||||||
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
|
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
|
||||||
if (searchManager != null) {
|
if (searchManager != null) {
|
||||||
List<SearchableInfo> searchables = searchManager.getSearchablesInGlobalSearch();
|
|
||||||
SearchableInfo searchableInfo = searchManager.getSearchableInfo(getComponentName());
|
SearchableInfo searchableInfo = searchManager.getSearchableInfo(getComponentName());
|
||||||
for (SearchableInfo info : searchables) {
|
|
||||||
if (info.getSuggestAuthority() != null
|
|
||||||
&& info.getSuggestAuthority().startsWith("applications")) {
|
|
||||||
searchableInfo = info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
searchView.setSearchableInfo(searchableInfo);
|
searchView.setSearchableInfo(searchableInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue