Minor fixes on Autofill Framework:
- Removed default implementation of onProvideAutofillVirtualStructure() that
was using accessibility API (it's useless because without the View calling
AutofillManager.notifyViewEntered(), it would never be triggered).
- Fixed obsolete TODOs.
- Removed obsolete service class name constant.
- Removed unused debug constant.
Fixes: 37078783
Fixes: 33197203
Bug: 33802548
Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Merged-In: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183
Change-Id: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183
diff --git a/core/java/android/service/autofill/AutofillService.java b/core/java/android/service/autofill/AutofillService.java
index 813c54f..5036178 100644
--- a/core/java/android/service/autofill/AutofillService.java
+++ b/core/java/android/service/autofill/AutofillService.java
@@ -36,9 +36,6 @@
import java.util.List;
-//TODO(b/33197203): improve javadoc (of both class and methods); in particular, make sure the
-//life-cycle (and how state could be maintained on server-side) is well documented.
-
/**
* Top-level service of the current autofill service for a given user.
*
@@ -50,19 +47,6 @@
/**
* The {@link Intent} that must be declared as handled by the service.
* To be supported, the service must also require the
- * {@link android.Manifest.permission#BIND_AUTO_FILL} permission so
- * that other applications can not abuse it.
- *
- * @hide
- * @deprecated TODO(b/35956626): remove once clients use AutofillService
- */
- @Deprecated
- @SdkConstant(SdkConstant.SdkConstantType.SERVICE_ACTION)
- public static final String OLD_SERVICE_INTERFACE = "android.service.autofill.AutoFillService";
-
- /**
- * The {@link Intent} that must be declared as handled by the service.
- * To be supported, the service must also require the
* {@link android.Manifest.permission#BIND_AUTOFILL} permission so
* that other applications can not abuse it.
*/
@@ -92,8 +76,6 @@
private static final int MSG_ON_FILL_REQUEST = 3;
private static final int MSG_ON_SAVE_REQUEST = 4;
- private static final int UNUSED_ARG = -1;
-
private final IAutoFillService mInterface = new IAutoFillService.Stub() {
@Override
public void onConnectedStateChanged(boolean connected) {
@@ -170,8 +152,7 @@
@Override
public final IBinder onBind(Intent intent) {
- if (SERVICE_INTERFACE.equals(intent.getAction())
- || OLD_SERVICE_INTERFACE.equals(intent.getAction())) {
+ if (SERVICE_INTERFACE.equals(intent.getAction())) {
return mInterface.asBinder();
}
Log.w(TAG, "Tried to bind to wrong intent: " + intent);
@@ -282,7 +263,6 @@
@Deprecated
public final void disableSelf() {
- // TODO(b/33197203): Remove when GCore has migrated off this API
getSystemService(AutofillManager.class).disableOwnedAutofillServices();
}