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

Commit e7fb442f authored by Simranjit Kohli's avatar Simranjit Kohli
Browse files

[Fill Dialog Improvements] Deprecate API's

Deperecate API's that are no longer relevant.

Bug: 336223371
Bug: 377868687
Flag: android.service.autofill.fill_dialog_improvements
Test: atest CtsAutoFillServiceTestCases
Change-Id: I371e299c2980ac525de5e6c3f9c4e2cf63bae5b5
parent 81fa7414
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -40314,7 +40314,7 @@ package android.service.autofill {
    field @NonNull public static final android.os.Parcelable.Creator<android.service.autofill.FillRequest> CREATOR;
    field public static final int FLAG_COMPATIBILITY_MODE_REQUEST = 2; // 0x2
    field public static final int FLAG_MANUAL_REQUEST = 1; // 0x1
    field public static final int FLAG_SUPPORTS_FILL_DIALOG = 64; // 0x40
    field @Deprecated @FlaggedApi("android.service.autofill.fill_dialog_improvements") public static final int FLAG_SUPPORTS_FILL_DIALOG = 64; // 0x40
  }
  public final class FillResponse implements android.os.Parcelable {
@@ -55862,13 +55862,13 @@ package android.view.autofill {
    method public void notifyViewExited(@NonNull android.view.View, int);
    method public void notifyViewVisibilityChanged(@NonNull android.view.View, boolean);
    method public void notifyViewVisibilityChanged(@NonNull android.view.View, int, boolean);
    method public void notifyVirtualViewsReady(@NonNull android.view.View, @NonNull android.util.SparseArray<android.view.autofill.VirtualViewFillInfo>);
    method @Deprecated @FlaggedApi("android.service.autofill.fill_dialog_improvements") public void notifyVirtualViewsReady(@NonNull android.view.View, @NonNull android.util.SparseArray<android.view.autofill.VirtualViewFillInfo>);
    method public void registerCallback(@Nullable android.view.autofill.AutofillManager.AutofillCallback);
    method public void requestAutofill(@NonNull android.view.View);
    method public void requestAutofill(@NonNull android.view.View, int, @NonNull android.graphics.Rect);
    method public void setUserData(@Nullable android.service.autofill.UserData);
    method public boolean showAutofillDialog(@NonNull android.view.View);
    method public boolean showAutofillDialog(@NonNull android.view.View, int);
    method @Deprecated @FlaggedApi("android.service.autofill.fill_dialog_improvements") public boolean showAutofillDialog(@NonNull android.view.View);
    method @Deprecated @FlaggedApi("android.service.autofill.fill_dialog_improvements") public boolean showAutofillDialog(@NonNull android.view.View, int);
    method public void unregisterCallback(@Nullable android.view.autofill.AutofillManager.AutofillCallback);
    field public static final String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE";
    field public static final String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT";
+10 −2
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@

package android.service.autofill;

import static android.service.autofill.Flags.FLAG_FILL_DIALOG_IMPROVEMENTS;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -100,7 +103,12 @@ public final class FillRequest implements Parcelable {
    /**
     * Indicates the request supports fill dialog presentation for the fields, the
     * system will send the request when the activity just started.
     *
     * @deprecated All requests would support fill dialog by default.
     * Presence of this flag isn't needed.
     */
    @FlaggedApi(FLAG_FILL_DIALOG_IMPROVEMENTS)
    @Deprecated
    public static final @RequestFlags int FLAG_SUPPORTS_FILL_DIALOG = 0x40;

    /**
@@ -588,10 +596,10 @@ public final class FillRequest implements Parcelable {
    };

    @DataClass.Generated(
            time = 1701010178309L,
            time = 1730991738865L,
            codegenVersion = "1.0.23",
            sourceFile = "frameworks/base/core/java/android/service/autofill/FillRequest.java",
            inputSignatures = "public static final @android.service.autofill.FillRequest.RequestFlags int FLAG_MANUAL_REQUEST\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_COMPATIBILITY_MODE_REQUEST\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_PASSWORD_INPUT_TYPE\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_VIEW_NOT_FOCUSED\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_SUPPORTS_FILL_DIALOG\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_IME_SHOWING\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_RESET_FILL_DIALOG_STATE\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_PCC_DETECTION\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_SCREEN_HAS_CREDMAN_FIELD\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_VIEW_REQUESTS_CREDMAN_SERVICE\npublic static final  int INVALID_REQUEST_ID\nprivate final  int mId\nprivate final @android.annotation.NonNull java.util.List<android.service.autofill.FillContext> mFillContexts\nprivate final @android.annotation.NonNull java.util.List<java.lang.String> mHints\nprivate final @android.annotation.Nullable android.os.Bundle mClientState\nprivate final @android.service.autofill.FillRequest.RequestFlags int mFlags\nprivate final @android.annotation.Nullable android.view.inputmethod.InlineSuggestionsRequest mInlineSuggestionsRequest\nprivate final @android.annotation.Nullable android.content.IntentSender mDelayedFillIntentSender\nprivate  void onConstructed()\nclass FillRequest extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true, genHiddenConstructor=true, genHiddenConstDefs=true)")
            inputSignatures = "public static final @android.service.autofill.FillRequest.RequestFlags int FLAG_MANUAL_REQUEST\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_COMPATIBILITY_MODE_REQUEST\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_PASSWORD_INPUT_TYPE\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_VIEW_NOT_FOCUSED\npublic static final @android.annotation.FlaggedApi @java.lang.Deprecated @android.service.autofill.FillRequest.RequestFlags int FLAG_SUPPORTS_FILL_DIALOG\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_IME_SHOWING\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_RESET_FILL_DIALOG_STATE\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_PCC_DETECTION\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_SCREEN_HAS_CREDMAN_FIELD\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_VIEW_REQUESTS_CREDMAN_SERVICE\npublic static final  int INVALID_REQUEST_ID\nprivate final  int mId\nprivate final @android.annotation.NonNull java.util.List<android.service.autofill.FillContext> mFillContexts\nprivate final @android.annotation.NonNull java.util.List<java.lang.String> mHints\nprivate final @android.annotation.Nullable android.os.Bundle mClientState\nprivate final @android.service.autofill.FillRequest.RequestFlags int mFlags\nprivate final @android.annotation.Nullable android.view.inputmethod.InlineSuggestionsRequest mInlineSuggestionsRequest\nprivate final @android.annotation.Nullable android.content.IntentSender mDelayedFillIntentSender\nprivate  void onConstructed()\nclass FillRequest extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true, genHiddenConstructor=true, genHiddenConstDefs=true)")
    @Deprecated
    private void __metadata() {}

+17 −0
Original line number Diff line number Diff line
@@ -25,12 +25,14 @@ import static android.service.autofill.FillRequest.FLAG_SCREEN_HAS_CREDMAN_FIELD
import static android.service.autofill.FillRequest.FLAG_SUPPORTS_FILL_DIALOG;
import static android.service.autofill.FillRequest.FLAG_VIEW_NOT_FOCUSED;
import static android.service.autofill.FillRequest.FLAG_VIEW_REQUESTS_CREDMAN_SERVICE;
import static android.service.autofill.Flags.FLAG_FILL_DIALOG_IMPROVEMENTS;
import static android.view.ContentInfo.SOURCE_AUTOFILL;
import static android.view.autofill.Helper.sDebug;
import static android.view.autofill.Helper.sVerbose;
import static android.view.autofill.Helper.toList;

import android.accessibilityservice.AccessibilityServiceInfo;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -1607,7 +1609,12 @@ public final class AutofillManager {
     *             the virtual view in the host view.
     *
     * @throws IllegalArgumentException if the {@code infos} was empty
     *
     * @deprecated This function will not do anything. Showing fill dialog is now fully controlled
     * by the framework and the autofill provider.
     */
    @FlaggedApi(FLAG_FILL_DIALOG_IMPROVEMENTS)
    @Deprecated
    public void notifyVirtualViewsReady(
            @NonNull View view, @NonNull SparseArray<VirtualViewFillInfo> infos) {
        Objects.requireNonNull(infos);
@@ -4034,8 +4041,13 @@ public final class AutofillManager {
     *             receiving a focus event. The autofill suggestions shown will include content for
     *             related views as well.
     * @return {@code true} if the autofill dialog is being shown
     *
     * @deprecated This function will not do anything. Showing fill dialog is now fully controlled
     * by the framework and the autofill provider.
     */
    // TODO(b/210926084): Consider whether to include the one-time show logic within this method.
    @FlaggedApi(FLAG_FILL_DIALOG_IMPROVEMENTS)
    @Deprecated
    public boolean showAutofillDialog(@NonNull View view) {
        Objects.requireNonNull(view);
        if (shouldShowAutofillDialog(view, view.getAutofillId())) {
@@ -4073,7 +4085,12 @@ public final class AutofillManager {
     *            suggestions.
     * @param virtualId id identifying the virtual view inside the host view.
     * @return {@code true} if the autofill dialog is being shown
     *
     * @deprecated This function will not do anything. Showing fill dialog is now fully controlled
     * by the framework and the autofill provider.
     */
    @FlaggedApi(FLAG_FILL_DIALOG_IMPROVEMENTS)
    @Deprecated
    public boolean showAutofillDialog(@NonNull View view, int virtualId) {
        Objects.requireNonNull(view);
        if (shouldShowAutofillDialog(view, getAutofillId(view, virtualId))) {
+8 −0
Original line number Diff line number Diff line
@@ -22,3 +22,11 @@ flag {
    description: "Guards against Autofill-Credman Phase1 developer integration via new APIs"
    bug: "320730001"
}

flag {
    name: "fill_dialog_improvements"
    is_exported: true
    namespace: "autofill"
    description: "Improvements for Fill Dialog, including deprecation of pre-trigger API's"
    bug: "336223371"
}