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

Commit c8c4fea6 authored by Felipe Leme's avatar Felipe Leme Committed by Android (Google) Code Review
Browse files

Merge "Log when the autofill service fails a callback."

parents f22e05e5 3ebb3592
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.service.autofill;
import android.annotation.Nullable;
import android.app.Activity;
import android.os.RemoteException;
import android.util.Log;

/**
 * <p><code>FillCallback</code> handles autofill requests from the {@link AutofillService} into
@@ -28,6 +29,9 @@ import android.os.RemoteException;
 * <a href="/guide/topics/text/autofill-services">Build autofill services</a>.
 */
public final class FillCallback {

    private static final String TAG = "FillCallback";

    private final IFillCallback mCallback;
    private final int mRequestId;
    private boolean mCalled;
@@ -70,6 +74,7 @@ public final class FillCallback {
     * @param message error message to be displayed to the user.
     */
    public void onFailure(@Nullable CharSequence message) {
        Log.w(TAG, "onFailure(): " + (message == null ? null : message.length() + "_chars"));
        assertNotCalled();
        mCalled = true;
        try {
+5 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.annotation.Nullable;
import android.app.Activity;
import android.content.IntentSender;
import android.os.RemoteException;
import android.util.Log;

import com.android.internal.util.Preconditions;

@@ -29,6 +30,9 @@ import com.android.internal.util.Preconditions;
 * autofilled.
 */
public final class SaveCallback {

    private static final String TAG = "SaveCallback";

    private final ISaveCallback mCallback;
    private boolean mCalled;

@@ -89,6 +93,7 @@ public final class SaveCallback {
     * @param message error message to be displayed to the user.
     */
    public void onFailure(CharSequence message) {
        Log.w(TAG, "onFailure(): " + (message == null ? null : message.length() + "_chars"));
        assertNotCalled();
        mCalled = true;
        try {
+2 −0
Original line number Diff line number Diff line
@@ -587,6 +587,7 @@ final class RemoteFillService implements DeathRecipient {
            }
            final RemoteFillService remoteService = getService();
            if (remoteService != null) {
                if (sVerbose) Slog.v(LOG_TAG, "calling onFillRequest() for id=" + mRequest.getId());
                try {
                    remoteService.mAutoFillService.onFillRequest(mRequest, mCallback);
                } catch (RemoteException e) {
@@ -659,6 +660,7 @@ final class RemoteFillService implements DeathRecipient {
        public void run() {
            final RemoteFillService remoteService = getService();
            if (remoteService != null) {
                if (sVerbose) Slog.v(LOG_TAG, "calling onSaveRequest()");
                try {
                    remoteService.mAutoFillService.onSaveRequest(mRequest, mCallback);
                } catch (RemoteException e) {