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

Commit b6ca909e authored by Mihai Popa's avatar Mihai Popa
Browse files

[Magnifier-62] Deprecate constructor

The CL deprecates the old constructor for Magnifier instances in favor
of the usage of builder Magnifier#Builder.

Bug: 116116502
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I3daa9f066c77144e9d5c62bc666ecd37041f4bbb
parent ddcd5481
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52964,7 +52964,7 @@ package android.widget {
  }
  public final class Magnifier {
    ctor public Magnifier(android.view.View);
    ctor public deprecated Magnifier(android.view.View);
    method public void dismiss();
    method public float getCornerRadius();
    method public int getDefaultHorizontalSourceToMagnifierOffset();
+2 −1
Original line number Diff line number Diff line
@@ -379,7 +379,8 @@ public class Editor {
                com.android.internal.R.bool.config_enableHapticTextHandle);

        if (FLAG_USE_MAGNIFIER) {
            mMagnifierAnimator = new MagnifierMotionAnimator(new Magnifier(mTextView));
            final Magnifier magnifier = new Magnifier.Builder(mTextView).build();
            mMagnifierAnimator = new MagnifierMotionAnimator(magnifier);
        }
    }

+2 −1
Original line number Diff line number Diff line
@@ -119,8 +119,9 @@ public final class Magnifier {
     *
     * @param view the view for which this magnifier is attached
     *
     * @see Builder
     * @deprecated Please use {@link Builder} instead
     */
    @Deprecated
    public Magnifier(@NonNull View view) {
        this(new Builder(view));
    }