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

Commit 66465412 authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Merge "Shows a Toast when manual autofill request cannot be fulfilled." into oc-dev am: 11d1a392

am: 7376cd0c

Change-Id: Ie0db855391fbdd567d1aa64e1783c2158e28dd60
parents f0ebb3f7 7376cd0c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4585,6 +4585,9 @@
    <!-- Accessibility title for the autofill dialog used to select a list of options to autofill an activity. [CHAR LIMIT=NONE] -->
    <string name="autofill_picker_accessibility_title">Autofill options</string>

    <!-- Toast message shown when user manually request autofill but service could not figure out the data that would autofill the screen contents. [CHAR LIMIT=NONE] -->
    <string name="autofill_error_cannot_autofill">Contents can\u2019t be autofilled</string>

    <!-- Title for the autofill save dialog shown when the the contents of the activity can be saved
         by an autofill service, but the service does not know what the activity represents [CHAR LIMIT=NONE] -->
    <string name="autofill_save_title">Save to <xliff:g id="label" example="MyPass">%1$s</xliff:g>?</string>
+1 −0
Original line number Diff line number Diff line
@@ -2875,6 +2875,7 @@
  <java-symbol type="id" name="autofill_save_no" />
  <java-symbol type="id" name="autofill_save_yes" />
  <java-symbol type="id" name="autofill_save_close" />
  <java-symbol type="string" name="autofill_error_cannot_autofill" />
  <java-symbol type="string" name="autofill" />
  <java-symbol type="string" name="autofill_picker_accessibility_title " />
  <java-symbol type="string" name="autofill_save_title" />
+4 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ import android.view.autofill.AutofillValue;
import android.view.autofill.IAutoFillManagerClient;
import android.view.autofill.IAutofillWindowPresenter;

import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
@@ -190,6 +191,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
    public void onFillRequestSuccess(@Nullable FillResponse response,
            @NonNull String servicePackageName) {
        if (response == null) {
            if ((mFlags & FLAG_MANUAL_REQUEST) != 0) {
                getUiForShowing().showError(R.string.autofill_error_cannot_autofill);
            }
            // Nothing to be done, but need to notify client.
            notifyUnavailableToClient();
            removeSelf();
+7 −0
Original line number Diff line number Diff line
@@ -86,6 +86,13 @@ public final class AutoFillUI {
        });
    }

    /**
     * Displays an error message to the user.
     */
    public void showError(int resId) {
        showError(mContext.getString(resId));
    }

    /**
     * Displays an error message to the user.
     */