Bug 1015450 - Prevent toolbar from going into an inconsistent state when tapped when entering editing mode. r=lucasr

This commit is contained in:
Michael Comella 2014-05-30 09:42:41 -07:00
parent 354b18e913
commit 2c8dc38e7e
2 changed files with 8 additions and 0 deletions

View File

@ -1617,6 +1617,10 @@ abstract public class BrowserApp extends GeckoApp
throw new IllegalArgumentException("Cannot handle null URLs in enterEditingMode");
}
if (mBrowserToolbar.isEditing() || mBrowserToolbar.isAnimating()) {
return;
}
final Tab selectedTab = Tabs.getInstance().getSelectedTab();
mTargetTabForEditingMode = (selectedTab != null ? selectedTab.getId() : null);

View File

@ -934,6 +934,10 @@ public class BrowserToolbar extends ThemedRelativeLayout
return (uiMode == UIMode.EDIT);
}
public boolean isAnimating() {
return isAnimatingEntry;
}
public void startEditing(String url, PropertyAnimator animator) {
if (isEditing()) {
return;