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

Commit 713f6284 authored by Aga Wronska's avatar Aga Wronska
Browse files

Pressing back button clears search

Bug:26143308
Change-Id: Iaa02d39a6ee1fd1a0c7d4d07453a481af97c7664
parent f11e42db
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -755,11 +755,19 @@ public abstract class BaseActivity extends Activity {
         *     search currently.
         */
        boolean cancelSearch() {
            boolean collapsed = false;
            boolean closed = false;

            if (mActionBar.hasExpandedActionView()) {
                mActionBar.collapseActionView();
                return true;
                collapsed = true;
            }
            return false;

            if (isExpanded() || isSearching()) {
                onClose();
                closed = true;
            }
            return collapsed || closed;
        }

        boolean isSearching() {