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

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

Merge "Removed the Augmented Autofill blacklist APIs."

parents 2829e852 4a7a6256
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -9267,11 +9267,7 @@ package android.view.accessibility {
package android.view.autofill {
  public final class AutofillManager {
    method @NonNull public java.util.Set<android.content.ComponentName> getAugmentedAutofillDisabledActivities();
    method @NonNull public java.util.Set<java.lang.String> getAugmentedAutofillDisabledPackages();
    method public void setActivityAugmentedAutofillEnabled(@NonNull android.content.ComponentName, boolean);
    method public void setAugmentedAutofillWhitelist(@Nullable java.util.List<java.lang.String>, @Nullable java.util.List<android.content.ComponentName>);
    method public void setPackageAugmentedAutofillEnabled(@NonNull String, boolean);
  }
}
+0 −4
Original line number Diff line number Diff line
@@ -2639,11 +2639,7 @@ package android.view.autofill {
  }

  public final class AutofillManager {
    method @NonNull public java.util.Set<android.content.ComponentName> getAugmentedAutofillDisabledActivities();
    method @NonNull public java.util.Set<java.lang.String> getAugmentedAutofillDisabledPackages();
    method public void setActivityAugmentedAutofillEnabled(@NonNull android.content.ComponentName, boolean);
    method public void setAugmentedAutofillWhitelist(@Nullable java.util.List<java.lang.String>, @Nullable java.util.List<android.content.ComponentName>);
    method public void setPackageAugmentedAutofillEnabled(@NonNull String, boolean);
    field public static final int FLAG_SMART_SUGGESTION_SYSTEM = 1; // 0x1
    field public static final int MAX_TEMP_AUGMENTED_SERVICE_DURATION_MS = 120000; // 0x1d4c0
  }
+0 −72
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Set;

//TODO: use java.lang.ref.Cleaner once Android supports Java 9
import sun.misc.Cleaner;
@@ -1768,45 +1767,6 @@ public final class AutofillManager {
        }
    }

    /**
     * Defines whether augmented autofill should be triggered for activities with such
     * {@link android.content.ComponentName}.
     *
     * <p>Useful to blacklist a particular activity.
     *
     * <p><b>Note:</b> This method should only be called by the app providing the augmented autofill
     * service, and it's ignored if the caller isn't it.
     *
     * @hide
     */
    @SystemApi
    @TestApi
    //TODO(b/122654591): @TestApi is needed because CtsAutoFillServiceTestCases hosts the service
    //in the same package as the test, and that module is compiled with SDK=test_current
    public void setActivityAugmentedAutofillEnabled(@NonNull ComponentName activity,
            boolean enabled) {
        // TODO(b/123100824): implement
    }

    /**
     * Defines whether augmented autofill should be triggered for activities of the app with such
     * {@code packageName}.
     *
     * <p>Useful to blacklist any activity from a particular app.
     *
     * <p><b>Note:</b> This method should only be called by the app providing the augmented autofill
     * service, and it's ignored if the caller isn't it.
     *
     * @hide
     */
    @SystemApi
    @TestApi
    //TODO(b/122654591): @TestApi is needed because CtsAutoFillServiceTestCases hosts the service
    //in the same package as the test, and that module is compiled with SDK=test_current
    public void setPackageAugmentedAutofillEnabled(@NonNull String packageName, boolean enabled) {
        // TODO(b/123100824): implement
    }

    /**
     * Explicitly limits augmented autofill to the given packages and activities.
     *
@@ -1838,38 +1798,6 @@ public final class AutofillManager {
        // TODO(b/123100824): implement
    }

    /**
     * Gets the activities where augmented autofill was disabled by
     * {@link #setActivityAugmentedAutofillEnabled(ComponentName, boolean)}.
     *
     * <p><b>Note:</b> This method should only be called by the app providing the augmented autofill
     * service, and it's ignored if the caller isn't it.
     *
     * @hide
     */
    @SystemApi
    @TestApi
    @NonNull
    public Set<ComponentName> getAugmentedAutofillDisabledActivities() {
        return null; // TODO(b/123100824): implement
    }

    /**
     * Gets the apps where content capture was disabled by
     * {@link #setPackageAugmentedAutofillEnabled(String, boolean)}.
     *
     * <p><b>Note:</b> This method should only be called by the app providing the augmented autofill
     * service, and it's ignored if the caller isn't it.
     *
     * @hide
     */
    @SystemApi
    @TestApi
    @NonNull
    public Set<String> getAugmentedAutofillDisabledPackages() {
        return null; // TODO(b/123100824): implement
    }

    private void requestShowFillUi(int sessionId, AutofillId id, int width, int height,
            Rect anchorBounds, IAutofillWindowPresenter presenter) {
        final View anchor = findView(id);