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

Commit 6ac7dbfd authored by Grace Cheng's avatar Grace Cheng Committed by Android (Google) Code Review
Browse files

Merge "Change String param to CharSequence" into main

parents be8fc8e5 9b3fc431
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12713,14 +12713,14 @@ package android.security.authenticationpolicy {
  }
  @FlaggedApi("android.security.secure_lockdown") public final class DisableSecureLockDeviceParams implements android.os.Parcelable {
    ctor public DisableSecureLockDeviceParams(@NonNull String);
    ctor public DisableSecureLockDeviceParams(@NonNull CharSequence);
    method public int describeContents();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.security.authenticationpolicy.DisableSecureLockDeviceParams> CREATOR;
  }
  @FlaggedApi("android.security.secure_lockdown") public final class EnableSecureLockDeviceParams implements android.os.Parcelable {
    ctor public EnableSecureLockDeviceParams(@NonNull String);
    ctor public EnableSecureLockDeviceParams(@NonNull CharSequence);
    method public int describeContents();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.security.authenticationpolicy.EnableSecureLockDeviceParams> CREATOR;
+13 −6
Original line number Diff line number Diff line
@@ -38,23 +38,30 @@ public final class DisableSecureLockDeviceParams implements Parcelable {
    /**
     * Client message associated with the request to disable secure lock on the device. This message
     * will be shown on the device when secure lock mode is disabled.
     *
     * Since this text is shown in a restricted lockscreen state, typeface properties such as color,
     * font weight, or other formatting may not be honored.
     */
    private final @NonNull String mMessage;
    private final @NonNull CharSequence mMessage;

    /**
     * Creates DisableSecureLockDeviceParams with the given params.
     *
     * @param message Allows clients to pass in a message with information about the request to
     *                disable secure lock on the device. This message will be shown to the user when
     *                secure lock mode is disabled. If an empty string is provided, it will default
     *                to a system-defined string (e.g. "Secure lock mode has been disabled.")
     *                secure lock mode is disabled. If an empty CharSequence is provided, it will
     *                default to a system-defined CharSequence (e.g. "Secure lock mode has been
     *                disabled.")
     *
     *                Since this text is shown in a restricted lockscreen state, typeface properties
     *                such as color, font weight, or other formatting may not be honored.
     */
    public DisableSecureLockDeviceParams(@NonNull String message) {
    public DisableSecureLockDeviceParams(@NonNull CharSequence message) {
        mMessage = message;
    }

    private DisableSecureLockDeviceParams(@NonNull Parcel in) {
        mMessage = Objects.requireNonNull(in.readString8());
        mMessage = Objects.requireNonNull(in.readCharSequence());
    }

    public static final @NonNull Creator<DisableSecureLockDeviceParams> CREATOR =
@@ -77,6 +84,6 @@ public final class DisableSecureLockDeviceParams implements Parcelable {

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString8(mMessage);
        dest.writeCharSequence(mMessage);
    }
}
+13 −6
Original line number Diff line number Diff line
@@ -38,23 +38,30 @@ public final class EnableSecureLockDeviceParams implements Parcelable {
    /**
     * Client message associated with the request to enable secure lock on the device. This message
     * will be shown on the device when secure lock mode is enabled.
     *
     * Since this text is shown in a restricted lockscreen state, typeface properties such as color,
     * font weight, or other formatting may not be honored.
     */
    private final @NonNull String mMessage;
    private final @NonNull CharSequence mMessage;

    /**
     * Creates EnableSecureLockDeviceParams with the given params.
     *
     * @param message Allows clients to pass in a message with information about the request to
     *                enable secure lock on the device. This message will be shown to the user when
     *                secure lock mode is enabled. If an empty string is provided, it will default
     *                to a system-defined string (e.g. "Device is securely locked remotely.")
     *                secure lock mode is enabled. If an empty CharSequence is provided, it will
     *                default to a system-defined CharSequence (e.g. "Device is securely locked
     *                remotely.")
     *
     *                Since this text is shown in a restricted lockscreen state, typeface properties
     *                such as color, font weight, or other formatting may not be honored.
     */
    public EnableSecureLockDeviceParams(@NonNull String message) {
    public EnableSecureLockDeviceParams(@NonNull CharSequence message) {
        mMessage = message;
    }

    private EnableSecureLockDeviceParams(@NonNull Parcel in) {
        mMessage = Objects.requireNonNull(in.readString8());
        mMessage = Objects.requireNonNull(in.readCharSequence());
    }

    public static final @NonNull Creator<EnableSecureLockDeviceParams> CREATOR =
@@ -77,6 +84,6 @@ public final class EnableSecureLockDeviceParams implements Parcelable {

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString8(mMessage);
        dest.writeCharSequence(mMessage);
    }
}