diff options
| -rw-r--r-- | core/java/android/widget/PopupWindow.java | 13 | ||||
| -rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java index aac20c4434ad..8ba7beed3ffd 100644 --- a/core/java/android/widget/PopupWindow.java +++ b/core/java/android/widget/PopupWindow.java @@ -92,6 +92,7 @@ public class PopupWindow { private boolean mClipToScreen; private boolean mAllowScrollingAnchorParent = true; private boolean mLayoutInsetDecor = false; + private boolean mNotTouchModal; private OnTouchListener mTouchInterceptor; @@ -694,6 +695,15 @@ public class PopupWindow { } /** + * Set whether this window is touch modal or if outside touches will be sent to + * other windows behind it. + * @hide + */ + public void setTouchModal(boolean touchModal) { + mNotTouchModal = !touchModal; + } + + /** * <p>Change the width and height measure specs that are given to the * window manager by the popup. By default these are 0, meaning that * the current width or height is requested as an explicit size from @@ -1048,6 +1058,9 @@ public class PopupWindow { if (mLayoutInsetDecor) { curFlags |= WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR; } + if (mNotTouchModal) { + curFlags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; + } return curFlags; } diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index a52a53dde5bd..9205b9ac2d15 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -2154,6 +2154,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { mActionModePopup.setLayoutInScreenEnabled(true); mActionModePopup.setLayoutInsetDecor(true); mActionModePopup.setFocusable(true); + mActionModePopup.setOutsideTouchable(false); + mActionModePopup.setTouchModal(false); mActionModePopup.setWindowLayoutType( WindowManager.LayoutParams.TYPE_APPLICATION); mActionModePopup.setContentView(mActionModeView); |