[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
This commit is contained in:
Mihai Popa
2018-09-24 21:14:50 +01:00
parent ddcd54813b
commit b6ca909ed7
3 changed files with 5 additions and 3 deletions

View File

@@ -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();

View File

@@ -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);
}
}

View File

@@ -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));
}