Pressing back button clears search

Bug:26143308
Change-Id: Iaa02d39a6ee1fd1a0c7d4d07453a481af97c7664
This commit is contained in:
Aga Wronska
2015-12-21 11:43:40 -08:00
parent 3510bd9be5
commit 43f20493d0

View File

@@ -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() {