Skip to content

Commit 5ff7efa

Browse files
adampAndroid (Google) Code Review
authored andcommitted
Merge "Appease the simians" into jb-dev
2 parents 6387c8a + a60314c commit 5ff7efa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindow.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
import android.view.View;
8080
import android.view.ViewGroup;
8181
import android.view.ViewManager;
82+
import android.view.ViewParent;
8283
import android.view.ViewStub;
8384
import android.view.Window;
8485
import android.view.WindowManager;
@@ -582,7 +583,10 @@ private void openPanel(PanelFeatureState st, KeyEvent event) {
582583
st.decorView.setWindowBackground(getContext().getResources().getDrawable(
583584
backgroundResId));
584585

585-
586+
ViewParent shownPanelParent = st.shownPanelView.getParent();
587+
if (shownPanelParent != null && shownPanelParent instanceof ViewGroup) {
588+
((ViewGroup) shownPanelParent).removeView(st.shownPanelView);
589+
}
586590
st.decorView.addView(st.shownPanelView, lp);
587591

588592
/*

0 commit comments

Comments
 (0)