Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c07ebb6 authored by Karl Rosaen's avatar Karl Rosaen
Browse files

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
parent ec0a12cf
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;
    }

    /**