Skip to content

Commit a5c371b

Browse files
adampAndroid (Google) Code Review
authored andcommitted
Merge "Bug 5275928 - Invasion of the monkeys" into ics-mr0
2 parents 2159927 + 97e1836 commit a5c371b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ public ActionBarContextView(Context context, AttributeSet attrs, int defStyle) {
9393
a.recycle();
9494
}
9595

96+
@Override
97+
public void onDetachedFromWindow() {
98+
super.onDetachedFromWindow();
99+
if (mActionMenuPresenter != null) {
100+
mActionMenuPresenter.hideOverflowMenu();
101+
mActionMenuPresenter.hideSubMenus();
102+
}
103+
}
104+
96105
@Override
97106
public void setSplitActionBar(boolean split) {
98107
if (mSplitActionBar != split) {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ public void setWindowCallback(Window.Callback cb) {
285285
public void onDetachedFromWindow() {
286286
super.onDetachedFromWindow();
287287
removeCallbacks(mTabSelector);
288+
if (mActionMenuPresenter != null) {
289+
mActionMenuPresenter.hideOverflowMenu();
290+
mActionMenuPresenter.hideSubMenus();
291+
}
288292
}
289293

290294
@Override

0 commit comments

Comments
 (0)