Skip to content

Commit cdfc8bc

Browse files
George MountAndroid (Google) Code Review
authored andcommitted
Merge "Fix stack overflow during animation of action bar."
2 parents a131f4e + 9caeb14 commit cdfc8bc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/java/com/android/internal/widget/AbsActionBarView.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,12 @@ public void animateToVisibility(int visibility) {
161161

162162
@Override
163163
public void setVisibility(int visibility) {
164-
if (mVisibilityAnim != null) {
165-
mVisibilityAnim.end();
164+
if (visibility != getVisibility()) {
165+
if (mVisibilityAnim != null) {
166+
mVisibilityAnim.end();
167+
}
168+
super.setVisibility(visibility);
166169
}
167-
super.setVisibility(visibility);
168170
}
169171

170172
public boolean showOverflowMenu() {

0 commit comments

Comments
 (0)