Merge "[Magnifier-62] Deprecate constructor"

This commit is contained in:
Mihai Popa
2018-09-25 16:05:17 +00:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 3 deletions

View File

@@ -53349,7 +53349,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

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