diff --git a/core/api/current.txt b/core/api/current.txt index a53de83c882d5..1e65137662b1a 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -40553,7 +40553,7 @@ package android.service.controls.templates { package android.service.credentials { - public class Action implements android.os.Parcelable { + public final class Action implements android.os.Parcelable { ctor public Action(@NonNull android.app.slice.Slice); method public int describeContents(); method @NonNull public android.app.slice.Slice getSlice(); @@ -40561,7 +40561,7 @@ package android.service.credentials { field @NonNull public static final android.os.Parcelable.Creator CREATOR; } - public class BeginCreateCredentialRequest implements android.os.Parcelable { + public final class BeginCreateCredentialRequest implements android.os.Parcelable { ctor public BeginCreateCredentialRequest(@NonNull String, @NonNull android.os.Bundle, @Nullable android.service.credentials.CallingAppInfo); ctor public BeginCreateCredentialRequest(@NonNull String, @NonNull android.os.Bundle); method public int describeContents(); @@ -40589,7 +40589,7 @@ package android.service.credentials { method @NonNull @RequiresPermission("android.permission.PROVIDE_REMOTE_CREDENTIALS") public android.service.credentials.BeginCreateCredentialResponse.Builder setRemoteCreateEntry(@Nullable android.service.credentials.RemoteEntry); } - public class BeginGetCredentialOption implements android.os.Parcelable { + public final class BeginGetCredentialOption implements android.os.Parcelable { ctor public BeginGetCredentialOption(@NonNull String, @NonNull String, @NonNull android.os.Bundle); method public int describeContents(); method @NonNull public android.os.Bundle getCandidateQueryData(); @@ -40668,7 +40668,7 @@ package android.service.credentials { field @NonNull public static final android.os.Parcelable.Creator CREATOR; } - public class CreateEntry implements android.os.Parcelable { + public final class CreateEntry implements android.os.Parcelable { ctor public CreateEntry(@NonNull android.app.slice.Slice); method public int describeContents(); method @NonNull public android.app.slice.Slice getSlice(); @@ -40676,7 +40676,7 @@ package android.service.credentials { field @NonNull public static final android.os.Parcelable.Creator CREATOR; } - public class CredentialEntry implements android.os.Parcelable { + public final class CredentialEntry implements android.os.Parcelable { ctor public CredentialEntry(@NonNull String, @NonNull String, @NonNull android.app.slice.Slice); ctor public CredentialEntry(@NonNull android.service.credentials.BeginGetCredentialOption, @NonNull android.app.slice.Slice); ctor public CredentialEntry(@NonNull String, @NonNull android.app.slice.Slice); @@ -40715,7 +40715,7 @@ package android.service.credentials { field @NonNull public static final android.os.Parcelable.Creator CREATOR; } - public class RemoteEntry implements android.os.Parcelable { + public final class RemoteEntry implements android.os.Parcelable { ctor public RemoteEntry(@NonNull android.app.slice.Slice); method public int describeContents(); method @NonNull public android.app.slice.Slice getSlice(); diff --git a/core/java/android/service/credentials/Action.java b/core/java/android/service/credentials/Action.java index 7487ac022c8e5..55133aea4fd69 100644 --- a/core/java/android/service/credentials/Action.java +++ b/core/java/android/service/credentials/Action.java @@ -17,7 +17,6 @@ package android.service.credentials; import android.annotation.NonNull; -import android.annotation.SuppressLint; import android.app.PendingIntent; import android.app.slice.Slice; import android.os.Parcel; @@ -31,14 +30,8 @@ import java.util.Objects; * *

If user selects this action entry, the corresponding {@link PendingIntent} set on the * {@code slice} as a {@link androidx.slice.core.SliceAction} will get invoked. - * - *

Any class that derives this class must only add extra field values to the {@code slice} - * object passed into the constructor. Any other field will not be parceled through. If the - * derived class has custom parceling implementation, this class will not be able to unpack - * the parcel without having access to that implementation. */ -@SuppressLint("ParcelNotFinal") -public class Action implements Parcelable { +public final class Action implements Parcelable { /** Slice object containing display content to be displayed with this action on the UI. */ @NonNull private final Slice mSlice; diff --git a/core/java/android/service/credentials/BeginCreateCredentialRequest.java b/core/java/android/service/credentials/BeginCreateCredentialRequest.java index 1ca0049550525..89aaa5ba70116 100644 --- a/core/java/android/service/credentials/BeginCreateCredentialRequest.java +++ b/core/java/android/service/credentials/BeginCreateCredentialRequest.java @@ -18,7 +18,6 @@ package android.service.credentials; import android.annotation.NonNull; import android.annotation.Nullable; -import android.annotation.SuppressLint; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; @@ -29,14 +28,8 @@ import com.android.internal.util.Preconditions; * Request for beginning a create credential request. * * See {@link BeginCreateCredentialResponse} for the counterpart response - * - *

Any class that derives this class must only add extra field values to the {@code slice} - * object passed into the constructor. Any other field will not be parceled through. If the - * derived class has custom parceling implementation, this class will not be able to unpack - * the parcel without having access to that implementation. */ -@SuppressLint("ParcelNotFinal") -public class BeginCreateCredentialRequest implements Parcelable { +public final class BeginCreateCredentialRequest implements Parcelable { private final @Nullable CallingAppInfo mCallingAppInfo; private final @NonNull String mType; private final @NonNull Bundle mData; diff --git a/core/java/android/service/credentials/BeginGetCredentialOption.java b/core/java/android/service/credentials/BeginGetCredentialOption.java index 1ad0424f44e34..b5f82d8949a13 100644 --- a/core/java/android/service/credentials/BeginGetCredentialOption.java +++ b/core/java/android/service/credentials/BeginGetCredentialOption.java @@ -17,7 +17,6 @@ package android.service.credentials; import android.annotation.NonNull; -import android.annotation.SuppressLint; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; @@ -29,14 +28,8 @@ import com.android.internal.util.Preconditions; * A specific type of credential request to be sent to the provider during the query phase of * a get flow. This request contains limited parameters needed to populate a list of * {@link CredentialEntry} on the {@link BeginGetCredentialResponse}. - * - *

Any class that derives this class must only add extra field values to the {@code slice} - * object passed into the constructor. Any other field will not be parceled through. If the - * derived class has custom parceling implementation, this class will not be able to unpack - * the parcel without having access to that implementation. */ -@SuppressLint("ParcelNotFinal") -public class BeginGetCredentialOption implements Parcelable { +public final class BeginGetCredentialOption implements Parcelable { private static final String BUNDLE_ID_KEY = "android.service.credentials.BeginGetCredentialOption.BUNDLE_ID_KEY"; /** diff --git a/core/java/android/service/credentials/CreateEntry.java b/core/java/android/service/credentials/CreateEntry.java index 106e65c3d70e9..6a9f09f257f36 100644 --- a/core/java/android/service/credentials/CreateEntry.java +++ b/core/java/android/service/credentials/CreateEntry.java @@ -17,7 +17,6 @@ package android.service.credentials; import android.annotation.NonNull; -import android.annotation.SuppressLint; import android.app.PendingIntent; import android.app.slice.Slice; import android.os.Parcel; @@ -33,14 +32,8 @@ import android.os.Parcelable; * the {@link android.app.Activity} result should be set to {@link android.app.Activity#RESULT_OK}, * and the {@link CredentialProviderService#EXTRA_CREATE_CREDENTIAL_RESPONSE} must be set with a * {@link android.credentials.CreateCredentialResponse} object. - * - *

Any class that derives this class must only add extra field values to the {@code slice} - * object passed into the constructor. Any other field will not be parceled through. If the - * derived class has custom parceling implementation, this class will not be able to unpack - * the parcel without having access to that implementation. */ -@SuppressLint("ParcelNotFinal") -public class CreateEntry implements Parcelable { +public final class CreateEntry implements Parcelable { private final @NonNull Slice mSlice; private CreateEntry(@NonNull Parcel in) { diff --git a/core/java/android/service/credentials/CredentialEntry.java b/core/java/android/service/credentials/CredentialEntry.java index e9cebd2e6af7e..512d8339e9448 100644 --- a/core/java/android/service/credentials/CredentialEntry.java +++ b/core/java/android/service/credentials/CredentialEntry.java @@ -20,7 +20,6 @@ import static java.util.Objects.requireNonNull; import android.annotation.NonNull; import android.annotation.Nullable; -import android.annotation.SuppressLint; import android.app.PendingIntent; import android.app.slice.Slice; import android.credentials.GetCredentialResponse; @@ -44,19 +43,8 @@ import com.android.internal.util.Preconditions; * result should be set to {@link android.app.Activity#RESULT_OK}, and the * {@link CredentialProviderService#EXTRA_GET_CREDENTIAL_RESPONSE} must be set with a * {@link GetCredentialResponse} object. - * - *

Any class that derives this class must only add extra field values to the {@code slice} - * object passed into the constructor. Any other field will not be parceled through. If the - * derived class has custom parceling implementation, this class will not be able to unpack - * the parcel without having access to that implementation. - * - *

While creating this entry, providers must set a {@code requestId} to be retrieved - * from {@link BeginGetCredentialOption#getId()}, to determine for which request this entry is - * being presented to the user. This will ensure that when user selects the entry, the correct - * complete request is added to the {@link PendingIntent} mentioned above. */ -@SuppressLint("ParcelNotFinal") -public class CredentialEntry implements Parcelable { +public final class CredentialEntry implements Parcelable { /** The request option that corresponds to this entry. **/ private final @Nullable String mBeginGetCredentialOptionId; diff --git a/core/java/android/service/credentials/RemoteEntry.java b/core/java/android/service/credentials/RemoteEntry.java index 716c00d726f3f..5b3218ad9aa89 100644 --- a/core/java/android/service/credentials/RemoteEntry.java +++ b/core/java/android/service/credentials/RemoteEntry.java @@ -17,7 +17,6 @@ package android.service.credentials; import android.annotation.NonNull; -import android.annotation.SuppressLint; import android.app.PendingIntent; import android.app.slice.Slice; import android.os.Parcel; @@ -40,14 +39,8 @@ import android.os.Parcelable; * For a creates flow, invoked through {@link CredentialProviderService#onBeginCreateCredential}, * providers must set a {@link android.credentials.CreateCredentialResponse} on the activity * result against the ket {@link CredentialProviderService#EXTRA_CREATE_CREDENTIAL_RESPONSE}. - * - *

Any class that extends this class must only add extra field values to the {@code slice} - * object passed into the constructor. Any other field will not be parceled through. If the - * derived class has custom parceling implementation, this class will not be able to unpack - * the parcel without having access to that implementation. */ -@SuppressLint("ParcelNotFinal") -public class RemoteEntry implements Parcelable { +public final class RemoteEntry implements Parcelable { private final @NonNull Slice mSlice; private RemoteEntry(@NonNull Parcel in) {