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

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

Merge "New Augmented Autofill APIs: onConnected() and onDisconnected()"

parents c6ab749e f3d317c8
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -6300,6 +6300,8 @@ package android.service.autofill.augmented {
    ctor public AugmentedAutofillService();
    ctor public AugmentedAutofillService();
    method protected final void dump(java.io.FileDescriptor, java.io.PrintWriter, String[]);
    method protected final void dump(java.io.FileDescriptor, java.io.PrintWriter, String[]);
    method protected void dump(@NonNull java.io.PrintWriter, @NonNull String[]);
    method protected void dump(@NonNull java.io.PrintWriter, @NonNull String[]);
    method public void onConnected();
    method public void onDisconnected();
    method public void onFillRequest(@NonNull android.service.autofill.augmented.FillRequest, @NonNull android.os.CancellationSignal, @NonNull android.service.autofill.augmented.FillController, @NonNull android.service.autofill.augmented.FillCallback);
    method public void onFillRequest(@NonNull android.service.autofill.augmented.FillRequest, @NonNull android.os.CancellationSignal, @NonNull android.service.autofill.augmented.FillController, @NonNull android.service.autofill.augmented.FillCallback);
    field public static final String SERVICE_INTERFACE = "android.service.autofill.augmented.AugmentedAutofillService";
    field public static final String SERVICE_INTERFACE = "android.service.autofill.augmented.AugmentedAutofillService";
  }
  }
+2 −0
Original line number Original line Diff line number Diff line
@@ -2057,6 +2057,8 @@ package android.service.autofill.augmented {
    ctor public AugmentedAutofillService();
    ctor public AugmentedAutofillService();
    method protected final void dump(java.io.FileDescriptor, java.io.PrintWriter, String[]);
    method protected final void dump(java.io.FileDescriptor, java.io.PrintWriter, String[]);
    method protected void dump(@NonNull java.io.PrintWriter, @NonNull String[]);
    method protected void dump(@NonNull java.io.PrintWriter, @NonNull String[]);
    method public void onConnected();
    method public void onDisconnected();
    method public void onFillRequest(@NonNull android.service.autofill.augmented.FillRequest, @NonNull android.os.CancellationSignal, @NonNull android.service.autofill.augmented.FillController, @NonNull android.service.autofill.augmented.FillCallback);
    method public void onFillRequest(@NonNull android.service.autofill.augmented.FillRequest, @NonNull android.os.CancellationSignal, @NonNull android.service.autofill.augmented.FillController, @NonNull android.service.autofill.augmented.FillCallback);
    field public static final String SERVICE_INTERFACE = "android.service.autofill.augmented.AugmentedAutofillService";
    field public static final String SERVICE_INTERFACE = "android.service.autofill.augmented.AugmentedAutofillService";
  }
  }
+16 −0
Original line number Original line Diff line number Diff line
@@ -125,6 +125,14 @@ public abstract class AugmentedAutofillService extends Service {
        return false;
        return false;
    }
    }


    /**
     * Called when the Android system connects to service.
     *
     * <p>You should generally do initialization here rather than in {@link #onCreate}.
     */
    public void onConnected() {
    }

    /**
    /**
     * Asks the service to handle an "augmented" autofill request.
     * Asks the service to handle an "augmented" autofill request.
     *
     *
@@ -158,6 +166,14 @@ public abstract class AugmentedAutofillService extends Service {
            @NonNull FillCallback callback) {
            @NonNull FillCallback callback) {
    }
    }


    /**
     * Called when the Android system disconnects from the service.
     *
     * <p> At this point this service may no longer be an active {@link AugmentedAutofillService}.
     */
    public void onDisconnected() {
    }

    private void handleOnFillRequest(int sessionId, @NonNull IBinder client, int taskId,
    private void handleOnFillRequest(int sessionId, @NonNull IBinder client, int taskId,
            @NonNull ComponentName componentName, @NonNull AutofillId focusedId,
            @NonNull ComponentName componentName, @NonNull AutofillId focusedId,
            @Nullable AutofillValue focusedValue, long requestTime,
            @Nullable AutofillValue focusedValue, long requestTime,