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

Commit 470564c9 authored by Andrey Kulikov's avatar Andrey Kulikov
Browse files

Restrict unsupported API usage to View.setFrame

Developers should use setLeftTopRightBottom() instead. Also making setLeftTopRightBottom final.

Bug: 117520377
Test: none
Change-Id: I67d196e4950d4ef43c9b15dbd00a7dc5d72a59d5
parent 0a639e49
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49331,7 +49331,7 @@ package android.view {
    method public void setLayoutDirection(int);
    method public void setLayoutParams(android.view.ViewGroup.LayoutParams);
    method public final void setLeft(int);
    method public void setLeftTopRightBottom(int, int, int, int);
    method public final void setLeftTopRightBottom(int, int, int, int);
    method public void setLongClickable(boolean);
    method protected final void setMeasuredDimension(int, int);
    method public void setMinimumHeight(int);
+2 −2
Original line number Diff line number Diff line
@@ -21468,7 +21468,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *         previous ones
     * {@hide}
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    protected boolean setFrame(int left, int top, int right, int bottom) {
        boolean changed = false;
@@ -21545,7 +21545,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *
     * @see #setLeft(int), #setRight(int), #setTop(int), #setBottom(int)
     */
    public void setLeftTopRightBottom(int left, int top, int right, int bottom) {
    public final void setLeftTopRightBottom(int left, int top, int right, int bottom) {
        setFrame(left, top, right, bottom);
    }