Fix broken links in @see tags in framework docs.
doclava was accidentally suppressing all these broken links
in @see tags. This CL fixes issues so we can start enfocing
checks for broken @see links.
Test: make docs
Exempt-From-Owner-Approval: Fixing @see javadoc link issues that are currently completely broken
Change-Id: I767e9fb9842494e5eccef2a7bdeee3877c488b5d
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index c2ac923..d18dccf 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -3893,7 +3893,6 @@
*
* @see Notification#FLAG_ONGOING_EVENT
- * @see Service#setForeground(boolean)
*/
public Builder setOngoing(boolean ongoing) {
setFlag(FLAG_ONGOING_EVENT, ongoing);
@@ -3912,7 +3911,7 @@
* However, for {@link MediaStyle} and {@link DecoratedMediaCustomViewStyle} notifications
* that have a media session attached there is no such requirement.
*
- * @see Builder#setColor(int)
+ * @see #setColor(int)
* @see MediaStyle#setMediaSession(MediaSession.Token)
*/
public Builder setColorized(boolean colorize) {
diff --git a/core/java/android/app/backup/BackupAgent.java b/core/java/android/app/backup/BackupAgent.java
index d1c957b..9657922 100644
--- a/core/java/android/app/backup/BackupAgent.java
+++ b/core/java/android/app/backup/BackupAgent.java
@@ -334,7 +334,6 @@
* @throws IOException
*
* @see Context#getNoBackupFilesDir()
- * @see ApplicationInfo#fullBackupContent
* @see #fullBackupFile(File, FullBackupDataOutput)
* @see #onRestoreFile(ParcelFileDescriptor, long, File, int, long, long)
*/
diff --git a/core/java/android/app/slice/Slice.java b/core/java/android/app/slice/Slice.java
index e54d3b6..d1aec04 100644
--- a/core/java/android/app/slice/Slice.java
+++ b/core/java/android/app/slice/Slice.java
@@ -425,7 +425,7 @@
/**
* Add a sub-slice to the slice being constructed
* @param subType Optional template-specific type information
- * @see {@link SliceItem#getSubType()}
+ * @see SliceItem#getSubType()
*/
public Builder addSubSlice(@NonNull Slice slice, @Nullable @SliceSubtype String subType) {
Preconditions.checkNotNull(slice);
@@ -437,7 +437,7 @@
/**
* Add an action to the slice being constructed
* @param subType Optional template-specific type information
- * @see {@link SliceItem#getSubType()}
+ * @see SliceItem#getSubType()
*/
public Slice.Builder addAction(@NonNull PendingIntent action, @NonNull Slice s,
@Nullable @SliceSubtype String subType) {
@@ -453,7 +453,7 @@
/**
* Add text to the slice being constructed
* @param subType Optional template-specific type information
- * @see {@link SliceItem#getSubType()}
+ * @see SliceItem#getSubType()
*/
public Builder addText(CharSequence text, @Nullable @SliceSubtype String subType,
@SliceHint List<String> hints) {
@@ -464,7 +464,7 @@
/**
* Add an image to the slice being constructed
* @param subType Optional template-specific type information
- * @see {@link SliceItem#getSubType()}
+ * @see SliceItem#getSubType()
*/
public Builder addIcon(Icon icon, @Nullable @SliceSubtype String subType,
@SliceHint List<String> hints) {
@@ -476,7 +476,7 @@
/**
* Add remote input to the slice being constructed
* @param subType Optional template-specific type information
- * @see {@link SliceItem#getSubType()}
+ * @see SliceItem#getSubType()
*/
public Slice.Builder addRemoteInput(RemoteInput remoteInput,
@Nullable @SliceSubtype String subType,
@@ -490,7 +490,7 @@
/**
* Add an integer to the slice being constructed
* @param subType Optional template-specific type information
- * @see {@link SliceItem#getSubType()}
+ * @see SliceItem#getSubType()
*/
public Builder addInt(int value, @Nullable @SliceSubtype String subType,
@SliceHint List<String> hints) {
@@ -511,7 +511,7 @@
/**
* Add a long to the slice being constructed
* @param subType Optional template-specific type information
- * @see {@link SliceItem#getSubType()}
+ * @see SliceItem#getSubType()
*/
public Slice.Builder addLong(long value, @Nullable @SliceSubtype String subType,
@SliceHint List<String> hints) {
@@ -525,7 +525,7 @@
* <p>Expected to be used for support library extension, should not be used for general
* development
* @param subType Optional template-specific type information
- * @see {@link SliceItem#getSubType()}
+ * @see SliceItem#getSubType()
*/
public Slice.Builder addBundle(Bundle bundle, @Nullable @SliceSubtype String subType,
@SliceHint List<String> hints) {
diff --git a/core/java/android/app/slice/SliceProvider.java b/core/java/android/app/slice/SliceProvider.java
index 5e75841..cc81d0e 100644
--- a/core/java/android/app/slice/SliceProvider.java
+++ b/core/java/android/app/slice/SliceProvider.java
@@ -204,8 +204,8 @@
*
* @param sliceUri Uri to bind.
* @param supportedSpecs List of supported specs.
- * @see {@link Slice}.
- * @see {@link Slice#HINT_PARTIAL}
+ * @see Slice.
+ * @see Slice#HINT_PARTIAL
*/
public Slice onBindSlice(Uri sliceUri, Set<SliceSpec> supportedSpecs) {
return onBindSlice(sliceUri, new ArrayList<>(supportedSpecs));
diff --git a/core/java/android/app/slice/SliceSpec.java b/core/java/android/app/slice/SliceSpec.java
index 03ffe6d..b3790e2 100644
--- a/core/java/android/app/slice/SliceSpec.java
+++ b/core/java/android/app/slice/SliceSpec.java
@@ -36,7 +36,7 @@
* {@link #canRender}.
*
* @see Slice
- * @see SliceProvider#onBindSlice(Uri)
+ * @see SliceProvider#onBindSlice(Uri, Set)
*/
public final class SliceSpec implements Parcelable {
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 32a6743..af09f15 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -766,7 +766,9 @@
* in the {@link Cursor} extras {@link Bundle}. See {@link #EXTRA_HONORED_ARGS}
* for details.
*
- * @see #QUERY_ARG_SORT_COLUMNS, #QUERY_ARG_SORT_DIRECTION, #QUERY_ARG_SORT_COLLATION.
+ * @see #QUERY_ARG_SORT_COLUMNS
+ * @see #QUERY_ARG_SORT_DIRECTION
+ * @see #QUERY_ARG_SORT_COLLATION
*
* @param uri The URI, using the content:// scheme, for the content to
* retrieve.
diff --git a/core/java/android/content/QuickViewConstants.java b/core/java/android/content/QuickViewConstants.java
index 132d43f..ffb131c 100644
--- a/core/java/android/content/QuickViewConstants.java
+++ b/core/java/android/content/QuickViewConstants.java
@@ -45,8 +45,8 @@
* Feature to delete an individual document. Quick viewer implementations must use
* Storage Access Framework to both verify delete permission and to delete content.
*
- * @see DocumentsContract.Document#FLAG_SUPPORTS_DELETE
- * @see DocumentsContract#deleteDocument(ContentResolver, Uri)
+ * @see android.provider.DocumentsContract.Document#FLAG_SUPPORTS_DELETE
+ * @see android.provider.DocumentsContract#deleteDocument(ContentResolver, android.net.Uri)
*/
public static final String FEATURE_DELETE = "android:delete";
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 1461711..7fa66d4 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -18,6 +18,7 @@
import android.annotation.IntDef;
import android.annotation.TestApi;
+import android.content.ComponentName;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Configuration.NativeConfig;
@@ -400,7 +401,7 @@
/**
* Bit in {@link #flags} indicating that this activity should be run with VR mode enabled.
*
- * {@see android.app.Activity#setVrMode(boolean)}.
+ * @see android.app.Activity#setVrModeEnabled(boolean, ComponentName)
*/
public static final int FLAG_ENABLE_VR_MODE = 0x8000;
diff --git a/core/java/android/content/pm/CrossProfileApps.java b/core/java/android/content/pm/CrossProfileApps.java
index 87f4dab..1c564f3 100644
--- a/core/java/android/content/pm/CrossProfileApps.java
+++ b/core/java/android/content/pm/CrossProfileApps.java
@@ -19,9 +19,7 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.res.Resources;
-import android.graphics.Rect;
import android.graphics.drawable.Drawable;
-import android.os.Bundle;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
@@ -107,7 +105,7 @@
* @return a label that calling app can show user for the semantic of launching its own
* activity in the specified user profile.
*
- * @see #startMainActivity(ComponentName, UserHandle, Rect, Bundle)
+ * @see #startMainActivity(ComponentName, UserHandle)
*/
public @NonNull CharSequence getProfileSwitchingLabel(@NonNull UserHandle userHandle) {
verifyCanAccessUser(userHandle);
diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java
index a50ac9b..89517cd 100644
--- a/core/java/android/content/pm/PackageInstaller.java
+++ b/core/java/android/content/pm/PackageInstaller.java
@@ -1333,10 +1333,10 @@
* The install reason should be a pre-defined integer. The behavior is
* undefined if other values are used.
*
- * @see PackageManager#INSTALL_REASON_UNKNOW
- * @see PackageManager#INSTALL_REASON_POLICY,
- * @see PackageManager#INSTALL_REASON_DEVICE_RESTORE,
- * @see PackageManager#INSTALL_REASON_DEVICE_SETUP,
+ * @see PackageManager#INSTALL_REASON_UNKNOWN
+ * @see PackageManager#INSTALL_REASON_POLICY
+ * @see PackageManager#INSTALL_REASON_DEVICE_RESTORE
+ * @see PackageManager#INSTALL_REASON_DEVICE_SETUP
* @see PackageManager#INSTALL_REASON_USER
*/
public void setInstallReason(@InstallReason int installReason) {
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 1268beb..ae59dbe 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -3989,7 +3989,7 @@
* <p>The sequence number starts at <code>0</code> and is
* reset every boot.
* @param sequenceNumber The first sequence number for which to retrieve package changes.
- * @see Settings.Global#BOOT_COUNT
+ * @see android.provider.Settings.Global#BOOT_COUNT
*/
public abstract @Nullable ChangedPackages getChangedPackages(
@IntRange(from=0) int sequenceNumber);
diff --git a/core/java/android/hardware/SensorManager.java b/core/java/android/hardware/SensorManager.java
index 35aaf78..cbddc91 100644
--- a/core/java/android/hardware/SensorManager.java
+++ b/core/java/android/hardware/SensorManager.java
@@ -902,7 +902,6 @@
* @throws NullPointerException when mem is null.
* @throws UncheckedIOException if not able to create channel.
* @see SensorDirectChannel#close()
- * @see #configureDirectChannel(SensorDirectChannel, Sensor, int)
*/
public SensorDirectChannel createDirectChannel(MemoryFile mem) {
return createDirectChannelImpl(mem, null);
@@ -925,7 +924,6 @@
* @throws NullPointerException when mem is null.
* @throws UncheckedIOException if not able to create channel.
* @see SensorDirectChannel#close()
- * @see #configureDirectChannel(SensorDirectChannel, Sensor, int)
*/
public SensorDirectChannel createDirectChannel(HardwareBuffer mem) {
return createDirectChannelImpl(null, mem);
@@ -983,7 +981,7 @@
* {@link android.hardware.SensorManager.DynamicSensorCallback
* DynamicSensorCallback}
* interface for receiving callbacks.
- * @see #addDynamicSensorCallback(DynamicSensorCallback, Handler)
+ * @see #registerDynamicSensorCallback(DynamicSensorCallback, Handler)
*
* @throws IllegalArgumentException when callback is null.
*/
diff --git a/core/java/android/nfc/NdefMessage.java b/core/java/android/nfc/NdefMessage.java
index 5df9272..0bb1108 100644
--- a/core/java/android/nfc/NdefMessage.java
+++ b/core/java/android/nfc/NdefMessage.java
@@ -16,12 +16,12 @@
package android.nfc;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-
import android.os.Parcel;
import android.os.Parcelable;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+
/**
* Represents an immutable NDEF Message.
@@ -187,7 +187,7 @@
* short record (SR) format and omit the identifier field when possible.
*
* @return NDEF Message in binary format
- * @see getByteArrayLength
+ * @see #getByteArrayLength()
*/
public byte[] toByteArray() {
int length = getByteArrayLength();
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 9188894..e25043d 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -231,8 +231,6 @@
* increase when the hardware manufacturer provides an OTA update.
* <p>
* Possible values are defined in {@link Build.VERSION_CODES}.
- *
- * @see #FIRST_SDK_INT
*/
public static final int SDK_INT = SystemProperties.getInt(
"ro.build.version.sdk", 0);
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index 2d1bb2f..aeced951 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -1835,7 +1835,6 @@
* @throws IOException when the storage device isn't present, or when it
* doesn't support allocating space, or if the device had
* trouble allocating the requested space.
- * @see #getAllocatableBytes(UUID, int)
* @see #isAllocationSupported(FileDescriptor)
* @see Environment#isExternalStorageEmulated(File)
*/
diff --git a/core/java/android/preference/PreferenceManager.java b/core/java/android/preference/PreferenceManager.java
index ea32dfd..6095e6f 100644
--- a/core/java/android/preference/PreferenceManager.java
+++ b/core/java/android/preference/PreferenceManager.java
@@ -531,7 +531,6 @@
* Returns the name used for storing default shared preferences.
*
* @see #getDefaultSharedPreferences(Context)
- * @see Context#getSharedPreferencesPath(String)
*/
public static String getDefaultSharedPreferencesName(Context context) {
return context.getPackageName() + "_preferences";
diff --git a/core/java/android/view/inputmethod/InputMethodSession.java b/core/java/android/view/inputmethod/InputMethodSession.java
index 74fbbc7..1d82abb 100644
--- a/core/java/android/view/inputmethod/InputMethodSession.java
+++ b/core/java/android/view/inputmethod/InputMethodSession.java
@@ -1,12 +1,12 @@
/*
* Copyright (C) 2007-2008 The Android Open Source Project
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -24,17 +24,17 @@
/**
* The InputMethodSession interface provides the per-client functionality
* of {@link InputMethod} that is safe to expose to applications.
- *
+ *
* <p>Applications will not normally use this interface themselves, instead
* relying on the standard interaction provided by
* {@link android.widget.TextView} and {@link android.widget.EditText}.
*/
public interface InputMethodSession {
-
+
public interface EventCallback {
void finishedEvent(int seq, boolean handled);
}
-
+
/**
* This method is called when the application would like to stop
* receiving text input.
@@ -44,7 +44,7 @@
/**
* This method is called when the selection or cursor in the current
* target input field has changed.
- *
+ *
* @param oldSelStart The previous text offset of the cursor selection
* start position.
* @param oldSelEnd The previous text offset of the cursor selection
@@ -75,48 +75,48 @@
* This method is called when cursor location of the target input field
* has changed within its window. This is not normally called, but will
* only be reported if requested by the input method.
- *
+ *
* @param newCursor The rectangle of the cursor currently being shown in
* the input field's window coordinates.
*/
public void updateCursor(Rect newCursor);
-
+
/**
* Called by a text editor that performs auto completion, to tell the
* input method about the completions it has available. This can be used
* by the input method to display them to the user to select the text to
* be inserted.
- *
+ *
* @param completions Array of text completions that are available, starting with
* the best. If this array is null, any existing completions will be
* removed.
*/
public void displayCompletions(CompletionInfo[] completions);
-
+
/**
* Called by a text editor to report its new extracted text when its
* contents change. This will only be called if the input method
* calls {@link InputConnection#getExtractedText(ExtractedTextRequest, int)
* InputConnection.getExtractedText()} with the option to report updates.
- *
+ *
* @param token The input method supplied token for identifying its request.
* @param text The new extracted text.
*/
public void updateExtractedText(int token, ExtractedText text);
-
+
/**
* This method is called when a key is pressed. When done with the event,
* the implementation must call back on <var>callback</var> with its
* result.
- *
+ *
* <p>
* If the input method wants to handle this event, return true, otherwise
* return false and the caller (i.e. the application) will handle the event.
- *
+ *
* @param event The key event.
- *
+ *
* @return Whether the input method wants to handle this event.
- *
+ *
* @see #dispatchKeyUp
* @see android.view.KeyEvent
*/
@@ -124,15 +124,15 @@
/**
* This method is called when there is a track ball event.
- *
+ *
* <p>
* If the input method wants to handle this event, return true, otherwise
* return false and the caller (i.e. the application) will handle the event.
- *
+ *
* @param event The motion event.
- *
+ *
* @return Whether the input method wants to handle this event.
- *
+ *
* @see android.view.MotionEvent
*/
public void dispatchTrackballEvent(int seq, MotionEvent event, EventCallback callback);
@@ -156,14 +156,14 @@
* Process a private command sent from the application to the input method.
* This can be used to provide domain-specific features that are
* only known between certain input methods and their clients.
- *
+ *
* @param action Name of the command to be performed. This <em>must</em>
* be a scoped name, i.e. prefixed with a package name you own, so that
* different developers will not create conflicting commands.
* @param data Any data to include with the command.
*/
public void appPrivateCommand(String action, Bundle data);
-
+
/**
* Toggle the soft input window.
* Applications can toggle the state of the soft input window.