Don't call SearchManager.isVisible() in Launcher.
SearchManager.isVisible() is a hidden method that should not be used by applications. Also, SearchManager.stopSearch() already checks whether the search dialog is visible before tryinf to dimiss it, so the check in Launcher was redundant.
This commit is contained in:
parent
a206daaed1
commit
0879cef6dd
|
@ -1244,9 +1244,7 @@ public final class Launcher extends Activity implements View.OnClickListener, On
|
|||
void stopSearch() {
|
||||
// Close search dialog
|
||||
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
|
||||
if (searchManager.isVisible()) {
|
||||
searchManager.stopSearch();
|
||||
}
|
||||
searchManager.stopSearch();
|
||||
// Restore search widget to its normal position
|
||||
Search searchWidget = mWorkspace.findSearchWidgetOnCurrentScreen();
|
||||
if (searchWidget != null) {
|
||||
|
|
Loading…
Reference in New Issue