Merge "Fix bug 5386915 - Action mode is intercepting touches it shouldn't be"
This commit is contained in:
@@ -92,6 +92,7 @@ public class PopupWindow {
|
||||
private boolean mClipToScreen;
|
||||
private boolean mAllowScrollingAnchorParent = true;
|
||||
private boolean mLayoutInsetDecor = false;
|
||||
private boolean mNotTouchModal;
|
||||
|
||||
private OnTouchListener mTouchInterceptor;
|
||||
|
||||
@@ -693,6 +694,15 @@ public class PopupWindow {
|
||||
return mWindowLayoutType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user