Bug 871522 - Encapsulate isEditing assignment into a setter (r=sriram)

This commit is contained in:
Lucas Rocha 2013-11-22 13:47:42 +00:00
Родитель 6820df2d6b
Коммит f08db5ad3d
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -219,7 +219,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
Tabs.registerOnTabsChangedListener(this);
mSwitchingTabs = true;
mIsEditing = false;
setIsEditing(false);
mAnimatingEntry = false;
mShowUrl = false;
mTrimURLs = true;
@ -1346,6 +1346,10 @@ public class BrowserToolbar extends GeckoRelativeLayout
}
}
public void setIsEditing(boolean isEditing) {
mIsEditing = isEditing;
}
/**
* Returns whether or not the URL bar is in editing mode (url bar is expanded, hiding the new
* tab button). Note that selection state is independent of editing mode.
@ -1360,7 +1364,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
}
mUrlEditText.setText(url != null ? url : "");
mIsEditing = true;
setIsEditing(true);
updateChildrenForEditing();
@ -1478,7 +1482,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
if (!isEditing()) {
return url;
}
mIsEditing = false;
setIsEditing(false);
updateChildrenForEditing();