From 67f9d5070a74a0bf34f0335899a96dedcac26c96 Mon Sep 17 00:00:00 2001
From: Jeff Sharkey
* This capability must be declared by the service as
- * {@link AccessibilityServiceInfo#CAPABILITY_CAN_CAPTURE_FINGERPRINT_GESTURES}. It also requires
+ * {@link AccessibilityServiceInfo#CAPABILITY_CAN_REQUEST_FINGERPRINT_GESTURES}. It also requires
* the permission {@link android.Manifest.permission#USE_FINGERPRINT}.
*
* Because capturing fingerprint gestures may have side effects, services with the capability only
- * capture gestures when {@link AccessibilityServiceInfo#FLAG_CAPTURE_FINGERPRINT_GESTURES} is set.
+ * capture gestures when {@link AccessibilityServiceInfo#FLAG_REQUEST_FINGERPRINT_GESTURES} is set.
*
* Note: The fingerprint sensor is used for authentication in critical use cases,
* so services must carefully design their user's experience when performing gestures on the sensor.
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index a209d2809ac35..dd6ad55fba6dd 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -395,7 +395,7 @@ public class AccountManager {
/**
* Key to set default visibility for applications which don't satisfy conditions in
- * {@link PACKAGE_NAME_KEY_LEGACY_VISIBLE}. If the value was not set by authenticator
+ * {@link #PACKAGE_NAME_KEY_LEGACY_VISIBLE}. If the value was not set by authenticator
* {@link #VISIBILITY_USER_MANAGED_NOT_VISIBLE} is used.
*/
public static final String PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE =
@@ -616,7 +616,7 @@ public class AccountManager {
* not authorized to view all accounts. This method can only be called by system apps and
* authenticators managing the type.
* Beginning API level {@link android.os.Build.VERSION_CODES#O} it also return accounts
- * which user can make visible to the application (see {@link VISIBILITY_USER_MANAGED_VISIBLE}).
+ * which user can make visible to the application (see {@link #VISIBILITY_USER_MANAGED_VISIBLE}).
*
* @param type The type of accounts to return, null to retrieve all accounts
* @param packageName The package name of the app for which the accounts are to be returned
@@ -654,7 +654,7 @@ public class AccountManager {
* of accounts made visible to it by user
* (see {@link #newChooseAccountIntent(Account, List, String[], String,
* String, String[], Bundle)}) or AbstractAcccountAuthenticator
- * using {@link setAccountVisibility}.
+ * using {@link #setAccountVisibility}.
* {@link android.Manifest.permission#GET_ACCOUNTS} permission is not used.
*
*
@@ -800,7 +800,7 @@ public class AccountManager {
* of accounts made visible to it by user
* (see {@link #newChooseAccountIntent(Account, List, String[], String,
* String, String[], Bundle)}) or AbstractAcccountAuthenticator
- * using {@link setAccountVisibility}.
+ * using {@link #setAccountVisibility}.
* {@link android.Manifest.permission#GET_ACCOUNTS} permission is not used.
*
*
@@ -2716,7 +2716,7 @@ public class AccountManager {
* On success the activity returns a Bundle with the account name and type specified using
* keys {@link #KEY_ACCOUNT_NAME} and {@link #KEY_ACCOUNT_TYPE}.
* Chosen account is marked as {@link #VISIBILITY_USER_MANAGED_VISIBLE} to the caller
- * (see {@link setAccountVisibility}) and will be returned to it in consequent
+ * (see {@link #setAccountVisibility}) and will be returned to it in consequent
* {@link #getAccountsByType}) calls.
*
* The most common case is to call this with one account type, e.g.:
@@ -2771,7 +2771,7 @@ public class AccountManager {
* On success the activity returns a Bundle with the account name and type specified using
* keys {@link #KEY_ACCOUNT_NAME} and {@link #KEY_ACCOUNT_TYPE}.
* Chosen account is marked as {@link #VISIBILITY_USER_MANAGED_VISIBLE} to the caller
- * (see {@link setAccountVisibility}) and will be returned to it in consequent
+ * (see {@link #setAccountVisibility}) and will be returned to it in consequent
* {@link #getAccountsByType}) calls.
*
* The most common case is to call this with one account type, e.g.:
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index c0381d69d6810..76643d6033048 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -298,7 +298,9 @@ public class KeyguardManager {
}
/**
- * Callback passed to {@link KeyguardManager#dismissKeyguard} to notify caller of result.
+ * Callback passed to
+ * {@link KeyguardManager#requestDismissKeyguard(Activity, KeyguardDismissCallback)}
+ * to notify caller of result.
*/
public static abstract class KeyguardDismissCallback {
diff --git a/core/java/android/app/usage/StorageStatsManager.java b/core/java/android/app/usage/StorageStatsManager.java
index 7c680794d140c..3d187ec7cb508 100644
--- a/core/java/android/app/usage/StorageStatsManager.java
+++ b/core/java/android/app/usage/StorageStatsManager.java
@@ -119,8 +119,7 @@ public class StorageStatsManager {
* could be reclaimed by the system.
*
* Apps making logical decisions about disk space should always use
- * {@link StorageManager#getAllocatableBytes(UUID, int)} instead of this
- * value.
+ * {@link StorageManager#getAllocatableBytes(UUID)} instead of this value.
*
* @param storageUuid the UUID of the storage volume you're interested in,
* such as {@link StorageManager#UUID_DEFAULT}.
diff --git a/core/java/android/companion/CompanionDeviceManager.java b/core/java/android/companion/CompanionDeviceManager.java
index 076deab5d211a..b2952aab23349 100644
--- a/core/java/android/companion/CompanionDeviceManager.java
+++ b/core/java/android/companion/CompanionDeviceManager.java
@@ -113,8 +113,8 @@ public final class CompanionDeviceManager {
*
* If your app needs to be excluded from battery optimizations (run in the background)
* or to have unrestricted data access (use data in the background) you can declare that
- * you use the {@link android.Manifest.permission#RUN_IN_BACKGROUND} and {@link
- * android.Manifest.permission#USE_DATA_IN_BACKGROUND} respectively. Note that these
+ * you use the {@link android.Manifest.permission#REQUEST_COMPANION_RUN_IN_BACKGROUND} and {@link
+ * android.Manifest.permission#REQUEST_COMPANION_USE_DATA_IN_BACKGROUND} respectively. Note that these
* special capabilities have a negative effect on the device's battery and user's data
* usage, therefore you should requested them when absolutely necessary.
* This method is best used as a pre-flight check, such as deciding if there * is enough space to store an entire music album before you allocate space @@ -1690,8 +1690,8 @@ public class StorageManager { * UUID for a specific path can be obtained using * {@link #getUuidForPath(File)}. * @return the maximum number of new bytes that the calling app can allocate - * using {@link #allocateBytes(UUID, long, int)} or - * {@link #allocateBytes(FileDescriptor, long, int)}. + * using {@link #allocateBytes(UUID, long)} or + * {@link #allocateBytes(FileDescriptor, long)}. * @throws IOException when the storage device isn't present, or when it * doesn't support allocating space. */ @@ -1724,11 +1724,11 @@ public class StorageManager { * files necessary to satisfy your request. *
* Attempts to allocate disk space beyond the value returned by - * {@link #getAllocatableBytes(UUID, int)} will fail. + * {@link #getAllocatableBytes(UUID)} will fail. *
* Since multiple apps can be running simultaneously, this method may be * subject to race conditions. If possible, consider using - * {@link #allocateBytes(FileDescriptor, long, int)} which will guarantee + * {@link #allocateBytes(FileDescriptor, long)} which will guarantee * that bytes are allocated to an opened file. *
* If you're progressively allocating an unbounded amount of storage space @@ -1742,7 +1742,7 @@ public class StorageManager { * @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 #getAllocatableBytes(UUID) */ @WorkerThread public void allocateBytes(@NonNull UUID storageUuid, @BytesLong long bytes) @@ -1772,7 +1772,7 @@ public class StorageManager { * necessary to satisfy your request. *
* Attempts to allocate disk space beyond the value returned by - * {@link #getAllocatableBytes(UUID, int)} will fail. + * {@link #getAllocatableBytes(UUID)} will fail. *
* This method guarantees that bytes have been allocated to the opened file, * otherwise it will throw if fast allocation is not possible. Fast diff --git a/core/java/android/provider/DocumentsContract.java b/core/java/android/provider/DocumentsContract.java index f2e25984aaa6f..ad4ec7248a816 100644 --- a/core/java/android/provider/DocumentsContract.java +++ b/core/java/android/provider/DocumentsContract.java @@ -44,6 +44,7 @@ import android.os.CancellationSignal; import android.os.OperationCanceledException; import android.os.Parcel; import android.os.ParcelFileDescriptor; +import android.os.ParcelFileDescriptor.OnCloseListener; import android.os.Parcelable; import android.os.ParcelableException; import android.os.RemoteException; diff --git a/core/java/android/provider/FontsContract.java b/core/java/android/provider/FontsContract.java index f90911421e109..d8540ffd639a5 100644 --- a/core/java/android/provider/FontsContract.java +++ b/core/java/android/provider/FontsContract.java @@ -447,14 +447,14 @@ public class FontsContract { public FontRequestCallback() {} /** - * Called then a Typeface request done via {@link #requestFont} is complete. Note that this + * Called then a Typeface request done via {@link #requestFonts} is complete. Note that this * method will not be called if {@link #onTypefaceRequestFailed(int)} is called instead. * @param typeface The Typeface object retrieved. */ public void onTypefaceRetrieved(Typeface typeface) {} /** - * Called when a Typeface request done via {@link #requestFont}} fails. + * Called when a Typeface request done via {@link #requestFonts}} fails. * @param reason One of {@link #FAIL_REASON_PROVIDER_NOT_FOUND}, * {@link #FAIL_REASON_FONT_NOT_FOUND}, * {@link #FAIL_REASON_FONT_LOAD_ERROR}, diff --git a/core/java/android/service/autofill/FillRequest.java b/core/java/android/service/autofill/FillRequest.java index fd6da05aa2371..1c32fe03ca7ef 100644 --- a/core/java/android/service/autofill/FillRequest.java +++ b/core/java/android/service/autofill/FillRequest.java @@ -61,9 +61,8 @@ public final class FillRequest implements Parcelable { *
An explicit autofill request is triggered when the * {@link android.view.autofill.AutofillManager#requestAutofill(View)} or * {@link android.view.autofill.AutofillManager#requestAutofill(View, int, android.graphics.Rect)} - * is called. For example, standard {@link android.widget.TextView} views that use - * an {@link android.widget.Editor} shows an {@code AUTOFILL} option in the overflow menu that - * triggers such request. + * is called. For example, standard {@link android.widget.TextView} views show an + * {@code AUTOFILL} option in the overflow menu that triggers such request. */ public static final int FLAG_MANUAL_REQUEST = 0x1; diff --git a/core/java/android/service/autofill/FillResponse.java b/core/java/android/service/autofill/FillResponse.java index 65b9cb2d2b504..b6a9a26484704 100644 --- a/core/java/android/service/autofill/FillResponse.java +++ b/core/java/android/service/autofill/FillResponse.java @@ -170,7 +170,7 @@ public final class FillResponse implements Parcelable { * @param ids id of Views that when focused will display the authentication UI affordance. * * @return This builder. - * @throw {@link IllegalArgumentException} if {@code ids} is {@code null} or empty, or if + * @throws IllegalArgumentException if {@code ids} is {@code null} or empty, or if * neither {@code authentication} nor {@code presentation} is non-{@code null}. * * @see android.app.PendingIntent#getIntentSender() diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java index 855c87b9098e3..a5223fd8acd5c 100644 --- a/core/java/android/service/notification/NotificationListenerService.java +++ b/core/java/android/service/notification/NotificationListenerService.java @@ -27,6 +27,7 @@ import android.app.NotificationChannel; import android.app.NotificationChannelGroup; import android.app.NotificationManager; import android.app.Service; +import android.companion.CompanionDeviceManager; import android.content.ComponentName; import android.content.Context; import android.content.Intent; @@ -64,7 +65,7 @@ import java.util.List; * A service that receives calls from the system when new notifications are * posted or removed, or their ranking changed. *
To extend this class, you must declare the service in your manifest file with - * the {@link Manifest.permission#BIND_NOTIFICATION_LISTENER_SERVICE} permission + * the {@link android.Manifest.permission#BIND_NOTIFICATION_LISTENER_SERVICE} permission * and include an intent filter with the {@link #SERVICE_INTERFACE} action. For example:
*
* <service android:name=".NotificationListener"
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index be763afddb887..1e50a85833ec8 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -992,21 +992,24 @@ public interface WindowManager extends ViewManager {
@Deprecated
public static final int FLAG_TURN_SCREEN_ON = 0x00200000;
- /** Window flag: when set the window will cause the keyguard to
- * be dismissed, only if it is not a secure lock keyguard. Because such
- * a keyguard is not needed for security, it will never re-appear if
- * the user navigates to another window (in contrast to
- * {@link #FLAG_SHOW_WHEN_LOCKED}, which will only temporarily
- * hide both secure and non-secure keyguards but ensure they reappear
- * when the user moves to another UI that doesn't hide them).
- * If the keyguard is currently active and is secure (requires an
- * unlock credential) than the user will still need to confirm it before
- * seeing this window, unless {@link #FLAG_SHOW_WHEN_LOCKED} has
- * also been set.
- * @deprecated Use {@link #FLAG_SHOW_WHEN_LOCKED} or {@link KeyguardManager#dismissKeyguard}
- * instead. Since keyguard was dismissed all the time as long as an activity with this flag
- * on its window was focused, keyguard couldn't guard against unintentional touches on the
- * screen, which isn't desired.
+ /**
+ * Window flag: when set the window will cause the keyguard to be
+ * dismissed, only if it is not a secure lock keyguard. Because such a
+ * keyguard is not needed for security, it will never re-appear if the
+ * user navigates to another window (in contrast to
+ * {@link #FLAG_SHOW_WHEN_LOCKED}, which will only temporarily hide both
+ * secure and non-secure keyguards but ensure they reappear when the
+ * user moves to another UI that doesn't hide them). If the keyguard is
+ * currently active and is secure (requires an unlock credential) than
+ * the user will still need to confirm it before seeing this window,
+ * unless {@link #FLAG_SHOW_WHEN_LOCKED} has also been set.
+ *
+ * @deprecated Use {@link #FLAG_SHOW_WHEN_LOCKED} or
+ * {@link KeyguardManager#requestDismissKeyguard} instead.
+ * Since keyguard was dismissed all the time as long as an
+ * activity with this flag on its window was focused,
+ * keyguard couldn't guard against unintentional touches on
+ * the screen, which isn't desired.
*/
@Deprecated
public static final int FLAG_DISMISS_KEYGUARD = 0x00400000;
diff --git a/core/java/android/webkit/SafeBrowsingResponse.java b/core/java/android/webkit/SafeBrowsingResponse.java
index 3540f80a2bca4..024a70bde467c 100644
--- a/core/java/android/webkit/SafeBrowsingResponse.java
+++ b/core/java/android/webkit/SafeBrowsingResponse.java
@@ -18,7 +18,7 @@ package android.webkit;
/**
* Used to indicate an action to take when hitting a malicious URL. Instances of this class are
- * created by the WebView and passed to {@link WebViewClient#onSafebrowsingHit}. The host
+ * created by the WebView and passed to {@link WebViewClient#onSafeBrowsingHit}. The host
* application must call {@link #showInterstitial}, {@link #proceed}, or {@link #backToSafety} to
* set the WebView's response to the Safe Browsing hit.
*/
diff --git a/core/java/android/widget/Button.java b/core/java/android/widget/Button.java
index 452ff17ee3d90..634cbe323d862 100644
--- a/core/java/android/widget/Button.java
+++ b/core/java/android/widget/Button.java
@@ -18,6 +18,7 @@ package android.widget;
import android.content.Context;
import android.util.AttributeSet;
+import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.PointerIcon;
import android.widget.RemoteViews.RemoteView;
@@ -54,7 +55,7 @@ import android.widget.RemoteViews.RemoteView;
* }
* }
*
- * The above snippet creates an instance of {@link View.OnClickListener} and wires + *
The above snippet creates an instance of {@link android.view.View.OnClickListener} and wires * the listener to the button using * {@link #setOnClickListener setOnClickListener(View.OnClickListener)}. * As a result, the system executes the code you write in {@code onClick(View)} after the @@ -77,15 +78,8 @@ import android.widget.RemoteViews.RemoteView; * {@link android.R.styleable#Button Button Attributes}, * {@link android.R.styleable#TextView TextView Attributes}, * {@link android.R.styleable#View View Attributes}. See the - * {@link Styles and Themes + * Styles and Themes * guide to learn how to implement and organize overrides to style-related attributes.
- * - * @see - * Buttons Guide - * {@link android.R.styleable#Button Styleable Button Attributes}, - * {@link android.R.styleable#TextView Styleable TextView Attributes}, - * {@link android.R.styleable#View Styleable View Attributes}, - * */ @RemoteView public class Button extends TextView { diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index 88c3c5b6101e1..380bf7add2390 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -66,7 +66,7 @@ import java.lang.annotation.RetentionPolicy; * both horizontal and vertical alignment of all child views within the single row or column. * *You can set - * {@link LinearLayout.LayoutParams.html#attr_android:layout_weight android:layout_weight} + * {@link android.R.styleable#LinearLayout_Layout_layout_weight android:layout_weight} * on individual child views to specify how linear layout divides remaining space amongst * the views it contains. See the * Linear Layout diff --git a/core/java/com/android/internal/util/CollectionUtils.java b/core/java/com/android/internal/util/CollectionUtils.java index dbb6e93de7d40..f0b47de8be98c 100644 --- a/core/java/com/android/internal/util/CollectionUtils.java +++ b/core/java/com/android/internal/util/CollectionUtils.java @@ -34,7 +34,7 @@ import java.util.function.*; import java.util.stream.Stream; /** - * Utility methods for dealing with (typically {@link Nullable}) {@link Collection}s + * Utility methods for dealing with (typically {@code Nullable}) {@link Collection}s * * Unless a method specifies otherwise, a null value for a collection is treated as an empty * collection of that type. diff --git a/core/java/com/android/internal/util/JournaledFile.java b/core/java/com/android/internal/util/JournaledFile.java index 9f775d3a79f25..5372fc0e28a1a 100644 --- a/core/java/com/android/internal/util/JournaledFile.java +++ b/core/java/com/android/internal/util/JournaledFile.java @@ -20,7 +20,7 @@ import java.io.File; import java.io.IOException; /** - * @deprecated Use {@link com.android.internal.os.AtomicFile} instead. It would + * @deprecated Use {@code AtomicFile} instead. It would * be nice to update all existing uses of this to switch to AtomicFile, but since * their on-file semantics are slightly different that would run the risk of losing * data if at the point of the platform upgrade to the new code it would need to diff --git a/core/java/com/android/internal/widget/RecyclerView.java b/core/java/com/android/internal/widget/RecyclerView.java index 0cf3164de98e3..7abc76a85af58 100644 --- a/core/java/com/android/internal/widget/RecyclerView.java +++ b/core/java/com/android/internal/widget/RecyclerView.java @@ -132,8 +132,6 @@ import java.util.List; *
* When writing a {@link LayoutManager} you almost always want to use layout positions whereas when
* writing an {@link Adapter}, you probably want to use adapter positions.
- *
- * @attr ref android.support.v7.recyclerview.R.styleable#RecyclerView_layoutManager
*/
public class RecyclerView extends ViewGroup implements ScrollingView, NestedScrollingChild {
@@ -9591,11 +9589,6 @@ public class RecyclerView extends ViewGroup implements ScrollingView, NestedScro
/**
* Parse the xml attributes to get the most common properties used by layout managers.
*
- * @attr ref android.support.v7.recyclerview.R.styleable#RecyclerView_android_orientation
- * @attr ref android.support.v7.recyclerview.R.styleable#RecyclerView_spanCount
- * @attr ref android.support.v7.recyclerview.R.styleable#RecyclerView_reverseLayout
- * @attr ref android.support.v7.recyclerview.R.styleable#RecyclerView_stackFromEnd
- *
* @return an object containing the properties as specified in the attrs.
*/
public static Properties getProperties(Context context, AttributeSet attrs,
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index f7e9b6df076ce..0289a8aaa5c62 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2547,7 +2547,6 @@