Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7177265e authored by Matvei Malkov's avatar Matvei Malkov
Browse files

Revert deletion and deprecate few PopupWindow methods

After method rename procedure b/126354063 we discovered that
androidx-platform-dev already depends on that methods added during fixit
week, so revert deletion of these methods and deprecate them.

Bug: b/126354063
Test: PopupWindowTests
Change-Id: I17b985542ffd661358059740bdf620e1bfb5b550
parent 5004517c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -56416,10 +56416,12 @@ package android.widget {
    method public int getWindowLayoutType();
    method public boolean isAboveAnchor();
    method public boolean isAttachedInDecor();
    method @Deprecated public boolean isClipToScreenEnabled();
    method public boolean isClippedToScreen();
    method public boolean isClippingEnabled();
    method public boolean isFocusable();
    method public boolean isLaidOutInScreen();
    method @Deprecated public boolean isLayoutInScreenEnabled();
    method public boolean isOutsideTouchable();
    method public boolean isShowing();
    method public boolean isSplitTouchEnabled();
@@ -56428,6 +56430,7 @@ package android.widget {
    method public void setAnimationStyle(int);
    method public void setAttachedInDecor(boolean);
    method public void setBackgroundDrawable(android.graphics.drawable.Drawable);
    method @Deprecated public void setClipToScreenEnabled(boolean);
    method public void setClippingEnabled(boolean);
    method public void setContentView(android.view.View);
    method public void setElevation(float);
@@ -56440,6 +56443,7 @@ package android.widget {
    method public void setInputMethodMode(int);
    method public void setIsClippedToScreen(boolean);
    method public void setIsLaidOutInScreen(boolean);
    method @Deprecated public void setLayoutInScreenEnabled(boolean);
    method public void setOnDismissListener(android.widget.PopupWindow.OnDismissListener);
    method public void setOutsideTouchable(boolean);
    method public void setOverlapAnchor(boolean);
+52 −0
Original line number Diff line number Diff line
@@ -881,6 +881,32 @@ public class PopupWindow {
        mClippingEnabled = enabled;
    }

    /**
     * <p>Indicates whether this popup will be clipped to the screen and not to the
     * containing window<p/>
     *
     * @return true if popup will be clipped to the screen instead of the window, false otherwise
     * @deprecated Use {@link #isClippedToScreen()} instead
     */
    @Deprecated
    public boolean isClipToScreenEnabled() {
        return mClipToScreen;
    }

    /**
     * <p>Clip this popup window to the screen, but not to the containing window.</p>
     *
     * <p>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.</p>
     *
     * @deprecated Use {@link #setIsClippedToScreen(boolean)} instead
     */
    @Deprecated
    public void setClipToScreenEnabled(boolean enabled) {
        mClipToScreen = enabled;
    }

    /**
     * <p>Indicates whether this popup will be clipped to the screen and not to the
     * containing window<p/>
@@ -955,6 +981,32 @@ public class PopupWindow {
        mSplitTouchEnabled = enabled ? 1 : 0;
    }

    /**
     * <p>Indicates whether the popup window will be forced into using absolute screen coordinates
     * for positioning.</p>
     *
     * @return true if the window will always be positioned in screen coordinates.
     *
     * @deprecated Use {@link #isLaidOutInScreen()} instead
     */
    @Deprecated
    public boolean isLayoutInScreenEnabled() {
        return mLayoutInScreen;
    }

    /**
     * <p>Allows the popup window to force the flag
     * {@link WindowManager.LayoutParams#FLAG_LAYOUT_IN_SCREEN}, overriding default behavior.
     * This will cause the popup to be positioned in absolute screen coordinates.</p>
     *
     * @param enabled true if the popup should always be positioned in screen coordinates
     * @deprecated Use {@link #setIsLaidOutInScreen(boolean)} instead
     */
    @Deprecated
    public void setLayoutInScreenEnabled(boolean enabled) {
        mLayoutInScreen = enabled;
    }

    /**
     * <p>Indicates whether the popup window will be forced into using absolute screen coordinates
     * for positioning.</p>