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

Commit db0b8bfd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Improves text of the negative button on the save UI"

parents 0715e47f 67428261
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -41525,6 +41525,7 @@ package android.service.autofill {
    field public static final int FLAG_DONT_SAVE_ON_FINISH = 2; // 0x2
    field public static final int FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE = 1; // 0x1
    field public static final int NEGATIVE_BUTTON_STYLE_CANCEL = 0; // 0x0
    field public static final int NEGATIVE_BUTTON_STYLE_NEVER = 2; // 0x2
    field public static final int NEGATIVE_BUTTON_STYLE_REJECT = 1; // 0x1
    field public static final int POSITIVE_BUTTON_STYLE_CONTINUE = 1; // 0x1
    field public static final int POSITIVE_BUTTON_STYLE_SAVE = 0; // 0x0
+14 −6
Original line number Diff line number Diff line
@@ -216,10 +216,21 @@ public final class SaveInfo implements Parcelable {
     */
    public static final int NEGATIVE_BUTTON_STYLE_REJECT = 1;

    /**
     * Style for the negative button of the save UI to never do the
     * save operation. This means that the user does not need to save
     * any data on this activity or application. Once the user tapping
     * the negative button, the service should never trigger the save
     * UI again. In addition to this, must consider providing restore
     * options for the user.
     */
    public static final int NEGATIVE_BUTTON_STYLE_NEVER = 2;

    /** @hide */
    @IntDef(prefix = { "NEGATIVE_BUTTON_STYLE_" }, value = {
            NEGATIVE_BUTTON_STYLE_CANCEL,
            NEGATIVE_BUTTON_STYLE_REJECT
            NEGATIVE_BUTTON_STYLE_REJECT,
            NEGATIVE_BUTTON_STYLE_NEVER
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface NegativeButtonStyle{}
@@ -571,6 +582,7 @@ public final class SaveInfo implements Parcelable {
         *
         * @see #NEGATIVE_BUTTON_STYLE_CANCEL
         * @see #NEGATIVE_BUTTON_STYLE_REJECT
         * @see #NEGATIVE_BUTTON_STYLE_NEVER
         *
         * @throws IllegalArgumentException If the style is invalid
         */
@@ -578,11 +590,7 @@ public final class SaveInfo implements Parcelable {
                @Nullable IntentSender listener) {
            throwIfDestroyed();
            Preconditions.checkArgumentInRange(style, NEGATIVE_BUTTON_STYLE_CANCEL,
                    NEGATIVE_BUTTON_STYLE_REJECT, "style");
            if (style != NEGATIVE_BUTTON_STYLE_CANCEL
                    && style != NEGATIVE_BUTTON_STYLE_REJECT) {
                throw new IllegalArgumentException("Invalid style: " + style);
            }
                    NEGATIVE_BUTTON_STYLE_NEVER, "style");
            mNegativeButtonStyle = style;
            mNegativeActionListener = listener;
            return this;
+4 −1
Original line number Diff line number Diff line
@@ -5083,11 +5083,14 @@
         data (for example, username, password and credit card info) [CHAR LIMIT=NONE] -->
    <string name="autofill_update_title_with_3types">Update these items in <b><xliff:g id="label" example="MyPass">%4$s</xliff:g></b>: <xliff:g id="type" example="Username">%1$s</xliff:g>, <xliff:g id="type" example="Password">%2$s</xliff:g>, and <xliff:g id="type" example="Credit Card">%3$s</xliff:g> ?</string>


    <!-- Label for the autofill save button [CHAR LIMIT=NONE] -->
    <string name="autofill_save_yes">Save</string>
    <!-- Label for the autofill cancel button [CHAR LIMIT=NONE] -->
    <string name="autofill_save_no">No thanks</string>
    <!-- Label for the autofill cancel button, saying not to save the filled data at this moment. [CHAR LIMIT=NONE] -->
    <string name="autofill_save_notnow">Not now</string>
    <!-- Label for the autofill reject button, saying never to save the filled data. [CHAR LIMIT=NONE] -->
    <string name="autofill_save_never">Never</string>
    <!-- Label for the autofill update button [CHAR LIMIT=NONE] -->
    <string name="autofill_update_yes">Update</string>
    <!-- Label for the autofill continue button [CHAR LIMIT=NONE] -->
+2 −0
Original line number Diff line number Diff line
@@ -3248,6 +3248,8 @@
  <java-symbol type="string" name="autofill_save_title_with_3types" />
  <java-symbol type="string" name="autofill_save_yes" />
  <java-symbol type="string" name="autofill_save_no" />
  <java-symbol type="string" name="autofill_save_notnow" />
  <java-symbol type="string" name="autofill_save_never" />
  <java-symbol type="string" name="autofill_save_type_password" />
  <java-symbol type="string" name="autofill_save_type_address" />
  <java-symbol type="string" name="autofill_save_type_credit_card" />
+1 −1
Original line number Diff line number Diff line
@@ -383,7 +383,7 @@ final class FillUi {
            }
            child.setOnClickListener((v) -> {
                if (sVerbose) {
                    Slog.v(TAG, "Applying " + id + " after " + v + " was clicked");
                    Slog.v(TAG, " Cancelling session after " + v + " clicked");
                }
                mCallback.cancelSession();
            });
Loading