Proactively set mVisible attribute in startSearch and stopSearch (not just in message handler).

This way someone can call searchManger.startSearch() and immediately have searchManger.isVisible() reflect
the correct value.

Fixes failing tests and bug 1993675
This commit is contained in:
Karl Rosaen
2009-07-22 10:11:00 -07:00
parent ec0a12cf19
commit 1c07ebb651

View File

@@ -190,6 +190,9 @@ implements DialogInterface.OnCancelListener, DialogInterface.OnDismissListener {
msgData.putBundle(KEY_APP_SEARCH_DATA, appSearchData);
msgData.putInt(KEY_IDENT, ident);
mSearchUiThread.sendMessage(msg);
// be a little more eager in setting this so isVisible will return the correct value if
// called immediately after startSearch
mVisible = true;
}
/**
@@ -199,6 +202,9 @@ implements DialogInterface.OnCancelListener, DialogInterface.OnDismissListener {
public void stopSearch() {
if (DBG) debug("stopSearch()");
mSearchUiThread.sendEmptyMessage(MSG_STOP_SEARCH);
// be a little more eager in setting this so isVisible will return the correct value if
// called immediately after stopSearch
mVisible = false;
}
/**