Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e806a485 authored by Reema Bajwa's avatar Reema Bajwa
Browse files

Add documentation for slice construction in the framework

Test: N/A - javadoc change only
Bug: 281406136

Change-Id: I6192d21e6dc8b9394730be05ec4b3397683c663a
parent d73d60f4
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -46,7 +46,14 @@ public final class Action implements Parcelable {
     * <p> See details on usage of {@code Action} for various actionable entries in
     * {@link BeginCreateCredentialResponse} and {@link BeginGetCredentialResponse}.
     *
     * @param slice the display content to be displayed on the UI, along with this action
     * @param slice the slice containing the metadata to be shown on the UI, must be constructed
     *              through the {@link androidx.credentials.provider} Jetpack library;
     *              If constructed manually, the {@code slice} object must
     *              contain the non-null properties of the
     *              {@link androidx.credentials.provider.Action} class populated as slice items
     *              against specific hints as used in the class's {@code toSlice} method,
     *              since the Android System uses this library to parse the {@code slice} and
     *              extract the required attributes
     */
    public Action(@NonNull Slice slice) {
        Objects.requireNonNull(slice, "slice must not be null");
+8 −1
Original line number Diff line number Diff line
@@ -66,7 +66,14 @@ public final class CreateEntry implements Parcelable {
    /**
     * Constructs a CreateEntry to be displayed on the UI.
     *
     * @param slice the display content to be displayed on the UI, along with this entry
     * @param slice the slice containing the metadata to be shown on the UI, must be constructed
     *              through the {@link androidx.credentials.provider} Jetpack library;
     *              If constructed manually, the {@code slice} object must
     *              contain the non-null properties of the
     *              {@link androidx.credentials.provider.CreateEntry} class populated as slice items
     *              against specific hints as used in the class's {@code toSlice} method,
     *              since the Android System uses this library to parse the {@code slice} and
     *              extract the required attributes
     */
    public CreateEntry(
            @NonNull Slice slice) {
+8 −2
Original line number Diff line number Diff line
@@ -69,8 +69,14 @@ public final class CredentialEntry implements Parcelable {
     *                                   receive the complete corresponding
     *                                   {@link GetCredentialRequest}.
     * @param type the type of the credential for which this credential entry is being created
     * @param slice the slice containing the metadata to be shown on the UI. Must be
     *              constructed through the androidx.credentials jetpack library.
     * @param slice the slice containing the metadata to be shown on the UI, must be constructed
     *              through the {@link androidx.credentials.provider} Jetpack library;
     *              If constructed manually, the {@code slice} object must
     *              contain the non-null properties of the
     *              {@link androidx.credentials.provider.CredentialEntry} class populated as slice
     *              items against specific hints as used in the class's {@code toSlice} method,
     *              since the Android System uses this library to parse the {@code slice} and
     *              extract the required attributes
     *
     * @throws IllegalArgumentException If {@code beginGetCredentialOptionId} or {@code type}
     * is null, or empty
+8 −1
Original line number Diff line number Diff line
@@ -73,7 +73,14 @@ public final class RemoteEntry implements Parcelable {
    /**
     * Constructs a RemoteEntry to be displayed on the UI.
     *
     * @param slice the display content to be displayed on the UI, along with this entry
     * @param slice the slice containing the metadata to be shown on the UI, must be constructed
     *              through the {@link androidx.credentials.provider} Jetpack library;
     *              If constructed manually, the {@code slice} object must
     *              contain the non-null properties of the
     *              {@link androidx.credentials.provider.RemoteEntry} class populated as slice items
     *              against specific hints as used in the class's {@code toSlice} method,
     *              since the Android System uses this library to parse the {@code slice} and
     *              extract the required attributes
     */
    public RemoteEntry(
            @NonNull Slice slice) {