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:
Bjorn Bringert 2009-07-08 12:38:25 +01:00
parent a206daaed1
commit 0879cef6dd
1 changed files with 1 additions and 3 deletions

View File

@ -1244,9 +1244,7 @@ public final class Launcher extends Activity implements View.OnClickListener, On
void stopSearch() { void stopSearch() {
// Close search dialog // Close search dialog
SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE); SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
if (searchManager.isVisible()) {
searchManager.stopSearch(); searchManager.stopSearch();
}
// Restore search widget to its normal position // Restore search widget to its normal position
Search searchWidget = mWorkspace.findSearchWidgetOnCurrentScreen(); Search searchWidget = mWorkspace.findSearchWidgetOnCurrentScreen();
if (searchWidget != null) { if (searchWidget != null) {