From 2e5f38e0bfe797f3be6ffff5ba070f4dc1b870c1 Mon Sep 17 00:00:00 2001 From: Andrew Sapperstein Date: Wed, 29 Apr 2020 13:16:02 -0700 Subject: [PATCH] Update inner class constructor refs to use proper syntax. Previously, we generally required fully qualified names for referring to inner class constructors (like #Notification.Builder()) despite that not being valid javadoc. Now, we properly support #Builder() syntax and the old syntax will error. Bug: 6963924 Test: make doc-comment-check-docs Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f Merged-In: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f --- core/java/android/app/Instrumentation.java | 2 +- core/java/android/app/Notification.java | 6 +++--- core/java/android/service/autofill/CustomDescription.java | 2 +- core/java/android/service/autofill/ImageTransformation.java | 2 +- core/java/android/service/autofill/SaveInfo.java | 4 ++-- core/java/android/text/style/LineBackgroundSpan.java | 2 +- core/java/android/view/View.java | 4 ++-- .../android/view/textclassifier/ConversationActions.java | 4 ++-- media/java/android/media/AudioFocusRequest.java | 4 ++-- .../android/media/AudioPlaybackCaptureConfiguration.java | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java index cff6411c882c2..2049b3408c64e 100644 --- a/core/java/android/app/Instrumentation.java +++ b/core/java/android/app/Instrumentation.java @@ -729,7 +729,7 @@ public class Instrumentation { * a non-null value if the intent needs to be intercepted. * *

Whenever a new activity is started, this method will be called on instances created - * using {@link #Instrumentation.ActivityMonitor()} to check if there is a match. In case + * using {@link #ActivityMonitor()} to check if there is a match. In case * of a match, the activity start will be blocked and the returned result will be used. * * @param intent The intent used for starting the activity. diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index cefec441e7026..f2b2635c86361 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -3437,7 +3437,7 @@ public class Notification implements Parcelable } /** - * @deprecated use {@link Notification.Builder#Notification.Builder(Context, String)} + * @deprecated use {@link #Builder(Context, String)} * instead. All posted Notifications must specify a NotificationChannel Id. */ @Deprecated @@ -7071,7 +7071,7 @@ public class Notification implements Parcelable * Should be unique amongst all individuals in the conversation, and should be * consistent during re-posts of the notification. * - * @see Message#Notification.MessagingStyle.Message(CharSequence, long, CharSequence) + * @see Message#Message(CharSequence, long, CharSequence) * * @return this object for method chaining * @@ -7091,7 +7091,7 @@ public class Notification implements Parcelable * Should be null for messages by the current user, in which case * the platform will insert the user set in {@code MessagingStyle(Person)}. * - * @see Message#Notification.MessagingStyle.Message(CharSequence, long, CharSequence) + * @see Message#Message(CharSequence, long, CharSequence) * * @return this object for method chaining */ diff --git a/core/java/android/service/autofill/CustomDescription.java b/core/java/android/service/autofill/CustomDescription.java index c28d2bbe30ea6..e274460cdf037 100644 --- a/core/java/android/service/autofill/CustomDescription.java +++ b/core/java/android/service/autofill/CustomDescription.java @@ -262,7 +262,7 @@ public final class CustomDescription implements Parcelable { * * @param condition condition used to trigger the updates. * @param updates actions to be applied to the - * {@link #CustomDescription.Builder(RemoteViews) template presentation} when the condition + * {@link #Builder(RemoteViews) template presentation} when the condition * is satisfied. * * @return this builder diff --git a/core/java/android/service/autofill/ImageTransformation.java b/core/java/android/service/autofill/ImageTransformation.java index 12376e85e63e2..974f0ead9d192 100644 --- a/core/java/android/service/autofill/ImageTransformation.java +++ b/core/java/android/service/autofill/ImageTransformation.java @@ -123,7 +123,7 @@ public final class ImageTransformation extends InternalTransformation implements * {@link RemoteViews presentation} must contain a {@link ImageView} child with that id. * * @deprecated use - * {@link #ImageTransformation.Builder(AutofillId, Pattern, int, CharSequence)} instead. + * {@link #Builder(AutofillId, Pattern, int, CharSequence)} instead. */ @Deprecated public Builder(@NonNull AutofillId id, @NonNull Pattern regex, @DrawableRes int resId) { diff --git a/core/java/android/service/autofill/SaveInfo.java b/core/java/android/service/autofill/SaveInfo.java index 94b9d050a44dc..3a70befb35585 100644 --- a/core/java/android/service/autofill/SaveInfo.java +++ b/core/java/android/service/autofill/SaveInfo.java @@ -628,7 +628,7 @@ public final class SaveInfo implements Parcelable { * *

The sanitizer can also be used as an alternative for a * {@link #setValidator(Validator) validator}. If any of the {@code ids} is a - * {@link #SaveInfo.Builder(int, AutofillId[]) required id} and the {@code sanitizer} fails + * {@link #Builder(int, AutofillId[]) required id} and the {@code sanitizer} fails * because of it, then the save UI is not shown. * * @param sanitizer an implementation provided by the Android System. @@ -686,7 +686,7 @@ public final class SaveInfo implements Parcelable { * Builds a new {@link SaveInfo} instance. * * @throws IllegalStateException if no - * {@link #SaveInfo.Builder(int, AutofillId[]) required ids}, + * {@link #Builder(int, AutofillId[]) required ids}, * or {@link #setOptionalIds(AutofillId[]) optional ids}, or {@link #FLAG_DELAY_SAVE} * were set */ diff --git a/core/java/android/text/style/LineBackgroundSpan.java b/core/java/android/text/style/LineBackgroundSpan.java index 1dc469d485dcd..7cb91477738e6 100644 --- a/core/java/android/text/style/LineBackgroundSpan.java +++ b/core/java/android/text/style/LineBackgroundSpan.java @@ -112,7 +112,7 @@ public interface LineBackgroundSpan extends ParagraphStyle /** * @return the color of this span. - * @see Standard#LineBackgroundSpan.Standard(int) + * @see Standard#Standard(int) */ @ColorInt public final int getColor() { diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index fe60bba92739a..40dfcfc391a00 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -25801,9 +25801,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * Returns the View object that had been passed to the - * {@link #View.DragShadowBuilder(View)} + * {@link #DragShadowBuilder(View)} * constructor. If that View parameter was {@code null} or if the - * {@link #View.DragShadowBuilder()} + * {@link #DragShadowBuilder()} * constructor was used to instantiate the builder object, this method will return * null. * diff --git a/core/java/android/view/textclassifier/ConversationActions.java b/core/java/android/view/textclassifier/ConversationActions.java index b10a598a4b5de..7c527bae475d5 100644 --- a/core/java/android/view/textclassifier/ConversationActions.java +++ b/core/java/android/view/textclassifier/ConversationActions.java @@ -109,7 +109,7 @@ public final class ConversationActions implements Parcelable { /** * Represents the local user. * - * @see Builder#ConversationActions.Message.Builder(Person) + * @see Builder#Builder(Person) */ @NonNull public static final Person PERSON_USER_SELF = @@ -124,7 +124,7 @@ public final class ConversationActions implements Parcelable { * the remote user better, so that the underlying model could differentiate between * different remote users. * - * @see Builder#ConversationActions.Message.Builder(Person) + * @see Builder#Builder(Person) */ @NonNull public static final Person PERSON_USER_OTHERS = diff --git a/media/java/android/media/AudioFocusRequest.java b/media/java/android/media/AudioFocusRequest.java index 4e70501290585..4c0850b675a82 100644 --- a/media/java/android/media/AudioFocusRequest.java +++ b/media/java/android/media/AudioFocusRequest.java @@ -80,9 +80,9 @@ import android.os.Looper; *

An {@code AudioFocusRequest} instance always contains one of the four types of requests * explained above. It is passed when building an {@code AudioFocusRequest} instance with its * builder in the {@link Builder} constructor - * {@link AudioFocusRequest.Builder#AudioFocusRequest.Builder(int)}, or + * {@link AudioFocusRequest.Builder#Builder(int)}, or * with {@link AudioFocusRequest.Builder#setFocusGain(int)} after copying an existing instance with - * {@link AudioFocusRequest.Builder#AudioFocusRequest.Builder(AudioFocusRequest)}. + * {@link AudioFocusRequest.Builder#Builder(AudioFocusRequest)}. * *

Qualifying your focus request

*

Use case requiring a focus request

diff --git a/media/java/android/media/AudioPlaybackCaptureConfiguration.java b/media/java/android/media/AudioPlaybackCaptureConfiguration.java index 895846a292584..453704eea3986 100644 --- a/media/java/android/media/AudioPlaybackCaptureConfiguration.java +++ b/media/java/android/media/AudioPlaybackCaptureConfiguration.java @@ -83,7 +83,7 @@ public final class AudioPlaybackCaptureConfiguration { /** * @return the {@code MediaProjection} used to build this object. - * @see Builder#AudioPlaybackCaptureConfiguration.Builder(MediaProjection) + * @see Builder#Builder(MediaProjection) */ public @NonNull MediaProjection getMediaProjection() { return mProjection;