summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/system-current.txt9
-rw-r--r--api/test-current.txt9
-rw-r--r--core/java/android/service/autofill/augmented/AugmentedAutofillService.java2
-rw-r--r--core/java/android/service/autofill/augmented/FillCallback.java2
-rw-r--r--core/java/android/service/autofill/augmented/FillController.java4
-rw-r--r--core/java/android/service/autofill/augmented/FillRequest.java2
-rw-r--r--core/java/android/service/autofill/augmented/FillResponse.java4
-rw-r--r--core/java/android/service/autofill/augmented/FillWindow.java4
-rw-r--r--core/java/android/service/autofill/augmented/PresentationParams.java122
-rw-r--r--core/java/android/view/autofill/AutofillManager.java6
10 files changed, 4 insertions, 160 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index b974995e8d68..4eb285b6e99c 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -6301,20 +6301,11 @@ package android.service.autofill.augmented {
}
public abstract class PresentationParams {
- method public int getFlags();
- method @Nullable public android.service.autofill.augmented.PresentationParams.Area getFullArea();
method @Nullable public android.service.autofill.augmented.PresentationParams.Area getSuggestionArea();
- field public static final int FLAG_HINT_GRAVITY_BOTTOM = 2; // 0x2
- field public static final int FLAG_HINT_GRAVITY_LEFT = 4; // 0x4
- field public static final int FLAG_HINT_GRAVITY_RIGHT = 8; // 0x8
- field public static final int FLAG_HINT_GRAVITY_TOP = 1; // 0x1
- field public static final int FLAG_HOST_IME = 16; // 0x10
- field public static final int FLAG_HOST_SYSTEM = 32; // 0x20
}
public abstract static class PresentationParams.Area {
method @NonNull public android.graphics.Rect getBounds();
- method @Nullable public android.service.autofill.augmented.PresentationParams.Area getSubArea(@NonNull android.graphics.Rect);
}
}
diff --git a/api/test-current.txt b/api/test-current.txt
index adc7279b4ef8..8194785fd991 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -2074,20 +2074,11 @@ package android.service.autofill.augmented {
}
public abstract class PresentationParams {
- method public int getFlags();
- method @Nullable public android.service.autofill.augmented.PresentationParams.Area getFullArea();
method @Nullable public android.service.autofill.augmented.PresentationParams.Area getSuggestionArea();
- field public static final int FLAG_HINT_GRAVITY_BOTTOM = 2; // 0x2
- field public static final int FLAG_HINT_GRAVITY_LEFT = 4; // 0x4
- field public static final int FLAG_HINT_GRAVITY_RIGHT = 8; // 0x8
- field public static final int FLAG_HINT_GRAVITY_TOP = 1; // 0x1
- field public static final int FLAG_HOST_IME = 16; // 0x10
- field public static final int FLAG_HOST_SYSTEM = 32; // 0x20
}
public abstract static class PresentationParams.Area {
method @NonNull public android.graphics.Rect getBounds();
- method @Nullable public android.service.autofill.augmented.PresentationParams.Area getSubArea(@NonNull android.graphics.Rect);
}
}
diff --git a/core/java/android/service/autofill/augmented/AugmentedAutofillService.java b/core/java/android/service/autofill/augmented/AugmentedAutofillService.java
index 81d066d3d656..8695da237f97 100644
--- a/core/java/android/service/autofill/augmented/AugmentedAutofillService.java
+++ b/core/java/android/service/autofill/augmented/AugmentedAutofillService.java
@@ -61,8 +61,6 @@ import java.util.List;
*/
@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 abstract class AugmentedAutofillService extends Service {
private static final String TAG = AugmentedAutofillService.class.getSimpleName();
diff --git a/core/java/android/service/autofill/augmented/FillCallback.java b/core/java/android/service/autofill/augmented/FillCallback.java
index f2a7a35b2825..b989dd9cd4eb 100644
--- a/core/java/android/service/autofill/augmented/FillCallback.java
+++ b/core/java/android/service/autofill/augmented/FillCallback.java
@@ -31,8 +31,6 @@ import android.util.Log;
*/
@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 final class FillCallback {
private static final String TAG = FillCallback.class.getSimpleName();
diff --git a/core/java/android/service/autofill/augmented/FillController.java b/core/java/android/service/autofill/augmented/FillController.java
index d7bc893f884a..67f23d599e1d 100644
--- a/core/java/android/service/autofill/augmented/FillController.java
+++ b/core/java/android/service/autofill/augmented/FillController.java
@@ -38,10 +38,8 @@ import java.util.List;
*/
@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 final class FillController {
- private static final String TAG = "FillController";
+ private static final String TAG = FillController.class.getSimpleName();
private final AutofillProxy mProxy;
diff --git a/core/java/android/service/autofill/augmented/FillRequest.java b/core/java/android/service/autofill/augmented/FillRequest.java
index af9905f480df..9a97bb203f5a 100644
--- a/core/java/android/service/autofill/augmented/FillRequest.java
+++ b/core/java/android/service/autofill/augmented/FillRequest.java
@@ -31,8 +31,6 @@ import android.view.autofill.AutofillValue;
@SystemApi
// TODO(b/123100811): pass a requestId and/or sessionId?
@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 final class FillRequest {
final AutofillProxy mProxy;
diff --git a/core/java/android/service/autofill/augmented/FillResponse.java b/core/java/android/service/autofill/augmented/FillResponse.java
index f1e904a7d8bc..2ac406c5b08c 100644
--- a/core/java/android/service/autofill/augmented/FillResponse.java
+++ b/core/java/android/service/autofill/augmented/FillResponse.java
@@ -30,8 +30,6 @@ import java.util.List;
*/
@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 final class FillResponse {
private final FillWindow mFillWindow;
@@ -53,8 +51,6 @@ public final class FillResponse {
*/
@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 static final class Builder {
private FillWindow mFillWindow;
diff --git a/core/java/android/service/autofill/augmented/FillWindow.java b/core/java/android/service/autofill/augmented/FillWindow.java
index 40e3a1219501..6e06754e7b8a 100644
--- a/core/java/android/service/autofill/augmented/FillWindow.java
+++ b/core/java/android/service/autofill/augmented/FillWindow.java
@@ -63,10 +63,8 @@ import java.io.PrintWriter;
*/
@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 final class FillWindow implements AutoCloseable {
- private static final String TAG = "FillWindow";
+ private static final String TAG = FillWindow.class.getSimpleName();
private final Object mLock = new Object();
private final CloseGuard mCloseGuard = CloseGuard.get();
diff --git a/core/java/android/service/autofill/augmented/PresentationParams.java b/core/java/android/service/autofill/augmented/PresentationParams.java
index 1fb9032c9af5..334487dd6ab4 100644
--- a/core/java/android/service/autofill/augmented/PresentationParams.java
+++ b/core/java/android/service/autofill/augmented/PresentationParams.java
@@ -15,32 +15,19 @@
*/
package android.service.autofill.augmented;
-import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.graphics.Rect;
import android.service.autofill.augmented.AugmentedAutofillService.AutofillProxy;
-import android.util.DebugUtils;
import android.view.View;
import java.io.PrintWriter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
/**
* Abstraction of a "Smart Suggestion" component responsible to embed the autofill UI provided by
- * the intelligence service.
- *
- * <p>The Smart Suggestion can embed the autofill UI in 3 distinct places:
- *
- * <ul>
- * <li>A small area associated with suggestions (like a small strip in the top of the IME),
- * returned by {@link #getSuggestionArea()}
- * <li>The full area (like the full IME window), returned by {@link #getFullArea()}
- * <li>A subset of the aforementioned areas, returned by {@link Area#getSubArea(Rect)}
- * </ul>
+ * the augmented autofill service.
*
* <p>The Smart Suggestion is represented by a {@link Area} object that contains the
* dimensions the smart suggestion window, so the service can use it to calculate the size of the
@@ -50,54 +37,8 @@ import java.lang.annotation.RetentionPolicy;
*/
@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 abstract class PresentationParams {
- /**
- * Flag indicating the Smart Suggestion is hosted in the top of its container.
- */
- public static final int FLAG_HINT_GRAVITY_TOP = 0x1;
-
- /**
- * Flag indicating the Smart Suggestion is hosted in the bottom of its container.
- */
- public static final int FLAG_HINT_GRAVITY_BOTTOM = 0x2;
-
- /**
- * Flag indicating the Smart Suggestion is hosted in the left of its container.
- */
- public static final int FLAG_HINT_GRAVITY_LEFT = 0x4;
-
- /**
- * Flag indicating the Smart Suggestion is hosted in the right of its container.
- */
- public static final int FLAG_HINT_GRAVITY_RIGHT = 0x8;
-
- /**
- * Flag indicating the Smart Suggestion is hosted by the IME.
- */
- public static final int FLAG_HOST_IME = 0x10;
-
- /**
- * Flag indicating the Smart Suggestion is hosted by the Android System as a floating popup
- * window.
- */
- public static final int FLAG_HOST_SYSTEM = 0x20;
-
- /** @hide */
- @IntDef(flag = true, prefix = { "FLAG_" }, value = {
- FLAG_HINT_GRAVITY_TOP,
- FLAG_HINT_GRAVITY_BOTTOM,
- FLAG_HINT_GRAVITY_LEFT,
- FLAG_HINT_GRAVITY_RIGHT,
- FLAG_HOST_IME,
- FLAG_HOST_SYSTEM
- })
- @Retention(RetentionPolicy.SOURCE)
- @interface Flags {}
-
-
// /** @hide */
PresentationParams() {}
@@ -112,40 +53,7 @@ public abstract class PresentationParams {
return null;
}
- /**
- * Gets the full area for the of the Smart Suggestion provider.
- *
- * @return full dimensions, or {@code null} if the Smart Suggestion provider does not support
- * embeding the UI on its full area.
- */
- @Nullable
- public Area getFullArea() {
- return null;
- }
-
- /**
- * Gets flags associated with the Smart Suggestion.
- *
- * @return any combination of {@link #FLAG_HINT_GRAVITY_TOP},
- * {@link #FLAG_HINT_GRAVITY_BOTTOM}, {@link #FLAG_HINT_GRAVITY_LEFT},
- * {@link #FLAG_HINT_GRAVITY_RIGHT}, {@link #FLAG_HOST_IME}, or
- * {@link #FLAG_HOST_SYSTEM},
- */
- public @Flags int getFlags() {
- return 0;
- }
-
- /** @hide */
- void dump(@NonNull String prefix, @NonNull PrintWriter pw) {
- final int flags = getFlags();
- if (flags > 0) {
- pw.print(prefix); pw.print("flags: "); pw.println(flagsToString(flags));
- }
- }
-
- private static String flagsToString(int flags) {
- return DebugUtils.flagsToString(PresentationParams.class, "FLAG_", flags);
- }
+ abstract void dump(String prefix, PrintWriter pw);
/**
* Area associated with a {@link PresentationParams Smart Suggestions} provider.
@@ -154,8 +62,6 @@ public abstract class PresentationParams {
*/
@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 abstract static class Area {
/** @hide */
@@ -176,24 +82,6 @@ public abstract class PresentationParams {
return mBounds;
}
- /**
- * Gets a subarea limited by given boundaries.
- *
- * @param bounds boundaries relative to this Area.
- *
- * @return new subarea, or {@code null} if the Smart Suggestion host does not support such
- * subaarea.
- *
- * @throws IllegalArgumentException if the {@code bounds} is not fully-contained inside this
- * full Area.
- *
- */
- @Nullable
- public Area getSubArea(@NonNull Rect bounds) {
- // TODO(b/123100712): implement / check boundaries / throw IAE / add unit test
- return null;
- }
-
@Override
public String toString() {
return mBounds.toString();
@@ -220,13 +108,7 @@ public abstract class PresentationParams {
}
@Override
- public int getFlags() {
- return FLAG_HOST_SYSTEM | FLAG_HINT_GRAVITY_BOTTOM;
- }
-
- @Override
void dump(@NonNull String prefix, @NonNull PrintWriter pw) {
- super.dump(prefix, pw);
pw.print(prefix); pw.print("area: "); pw.println(mSuggestionArea);
}
}
diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java
index 5e5c8265f782..f93ac4ce7d16 100644
--- a/core/java/android/view/autofill/AutofillManager.java
+++ b/core/java/android/view/autofill/AutofillManager.java
@@ -1782,10 +1782,6 @@ public final class AutofillManager {
/**
* Explicitly limits augmented autofill to the given packages and activities.
*
- * <p>When the whitelist is set, it overrides the values passed to
- * {@link #setActivityAugmentedAutofillEnabled(ComponentName, boolean)}
- * and {@link #setPackageAugmentedAutofillEnabled(String, boolean)}.
- *
* <p>To reset the whitelist, call it passing {@code null} to both arguments.
*
* <p>Useful when the service wants to restrict augmented autofill to a category of apps, like
@@ -1803,8 +1799,6 @@ public final class AutofillManager {
*/
@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 setAugmentedAutofillWhitelist(@Nullable List<String> packages,
@Nullable List<ComponentName> activities) {
// TODO(b/123100824): implement