diff --git a/api/current.txt b/api/current.txt
index 66a4bd096aea8..f8a164da31431 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -56297,6 +56297,7 @@ package android.widget {
method public android.view.View getContentView();
method public float getElevation();
method @Nullable public android.transition.Transition getEnterTransition();
+ method @Nullable public android.graphics.Rect getEpicenterBounds();
method @Nullable public android.transition.Transition getExitTransition();
method public int getHeight();
method public int getInputMethodMode();
@@ -56309,30 +56310,37 @@ package android.widget {
method public int getWindowLayoutType();
method public boolean isAboveAnchor();
method public boolean isAttachedInDecor();
+ method public boolean isClipToScreenEnabled();
method public boolean isClippingEnabled();
method public boolean isFocusable();
+ method public boolean isLayoutInScreenEnabled();
method public boolean isOutsideTouchable();
method public boolean isShowing();
method public boolean isSplitTouchEnabled();
+ method public boolean isTouchModal();
method public boolean isTouchable();
method public void setAnimationStyle(int);
method public void setAttachedInDecor(boolean);
method public void setBackgroundDrawable(android.graphics.drawable.Drawable);
+ method public void setClipToScreenEnabled(boolean);
method public void setClippingEnabled(boolean);
method public void setContentView(android.view.View);
method public void setElevation(float);
method public void setEnterTransition(@Nullable android.transition.Transition);
+ method public void setEpicenterBounds(@Nullable android.graphics.Rect);
method public void setExitTransition(@Nullable android.transition.Transition);
method public void setFocusable(boolean);
method public void setHeight(int);
method public void setIgnoreCheekPress();
method public void setInputMethodMode(int);
+ method public void setLayoutInScreenEnabled(boolean);
method public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener);
method public void setOutsideTouchable(boolean);
method public void setOverlapAnchor(boolean);
method public void setSoftInputMode(int);
method public void setSplitTouchEnabled(boolean);
method public void setTouchInterceptor(android.view.View.OnTouchListener);
+ method public void setTouchModal(boolean);
method public void setTouchable(boolean);
method public void setWidth(int);
method @Deprecated public void setWindowLayoutMode(int, int);
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 705a371e483ef..88d938082b05e 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -264,7 +264,7 @@ public class PopupWindow {
private WeakReference
- * Transitions use a point or Rect, referred to as the epicenter, to orient
+ * Returns bounds which are used as a center of the enter and exit transitions. Transitions use Rect, referred to as the epicenter, to orient
* the direction of travel. For popup windows, the anchor view bounds are
- * used as the default epicenter.
- *
- * See {@link Transition#setEpicenterCallback(EpicenterCallback)} for more
- * information about how transition epicenters.
+ * used as the default epicenter. See {@link Transition#setEpicenterCallback(EpicenterCallback)} for more
+ * information about how transition epicenters work. Sets the bounds used as the epicenter of the enter and exit transitions. Transitions use Rect, referred to as the epicenter, to orient
+ * the direction of travel. For popup windows, the anchor view bounds are
+ * used as the default epicenter. See {@link Transition#setEpicenterCallback(EpicenterCallback)} for more
+ * information about how transition epicenters work. Indicates whether this popup will be clipped to the screen and not to the
+ * containing window Clip this popup window to the screen, but not to the containing window. If the popup is showing, calling this method will take effect only
+ * the next time the popup is shown or through a manual call to one of
+ * the {@link #update()} methods.
Indicates whether outside touches will be sent to this window + * or other windows behind it
+ * + * @return true if touches will be sent to this window, false otherwise + * + * @see #setTouchModal(boolean) + */ + public boolean isTouchModal() { + return !mNotTouchModal; + } + + /** + *Set whether this window is touch modal or if outside touches will be sent to + * other windows behind it.
+ * + *If the popup is showing, calling this method will take effect only + * the next time the popup is shown or through a manual call to one of + * the {@link #update()} methods.
+ * + * @param touchModal true to sent all outside touches to this window, + * false to other windows behind it + * + * @see #isTouchModal() */ - @UnsupportedAppUsage public void setTouchModal(boolean touchModal) { mNotTouchModal = !touchModal; } @@ -1454,7 +1507,7 @@ public class PopupWindow { * * @param p the layout parameters of the popup's content view */ - @UnsupportedAppUsage + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) private void invokePopup(WindowManager.LayoutParams p) { if (mContext != null) { p.packageName = mContext.getPackageName(); @@ -2060,6 +2113,8 @@ public class PopupWindow { *