Pressing back button clears search
Bug:26143308 Change-Id: Iaa02d39a6ee1fd1a0c7d4d07453a481af97c7664
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user