Removed deprecated auto(F)ill classes.

Bug: 35956626
Test: manual verification
Test: CtsAutoFillServiceTestCases pass
Change-Id: Icb622589c41e6a286d51e3f85bd5a813e483b5ea
diff --git a/core/java/android/service/autofill/AutoFillService.java b/core/java/android/service/autofill/AutoFillService.java
deleted file mode 100644
index c26f679..0000000
--- a/core/java/android/service/autofill/AutoFillService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.service.autofill;
-
-/**
- * @hide
- * @deprecated TODO(b/35956626): remove once clients use AutofillService
- */
-@Deprecated
-public abstract class AutoFillService extends AutofillService {
-}
diff --git a/core/java/android/service/autofill/AutofillService.java b/core/java/android/service/autofill/AutofillService.java
index 6f17d0e..9f8a621 100644
--- a/core/java/android/service/autofill/AutofillService.java
+++ b/core/java/android/service/autofill/AutofillService.java
@@ -71,7 +71,7 @@
      * Name under which a AutoFillService component publishes information about itself.
      * This meta-data should reference an XML resource containing a
      * <code>&lt;{@link
-     * android.R.styleable#AutoFillService autofill-service}&gt;</code> tag.
+     * android.R.styleable#AutofillService autofill-service}&gt;</code> tag.
      * This is a a sample XML file configuring an AutoFillService:
      * <pre> &lt;autofill-service
      *     android:settingsActivity="foo.bar.SettingsActivity"
diff --git a/core/java/android/service/autofill/AutofillServiceInfo.java b/core/java/android/service/autofill/AutofillServiceInfo.java
index f6d40db..0f4824e 100644
--- a/core/java/android/service/autofill/AutofillServiceInfo.java
+++ b/core/java/android/service/autofill/AutofillServiceInfo.java
@@ -36,7 +36,6 @@
 
 import java.io.IOException;
 
-// TODO(b/33197203 , b/33802548): add CTS tests
 /**
  * {@link ServiceInfo} and meta-data about an {@link AutofillService}.
  *
@@ -75,15 +74,8 @@
         mServiceInfo = si;
         final TypedArray metaDataArray = getMetaDataArray(pm, si);
         if (metaDataArray != null) {
-            // TODO(b/35956626): inline newSettingsActivity once clients migrate
-            final String newSettingsActivity =
-                    metaDataArray.getString(R.styleable.AutofillService_settingsActivity);
-            if (newSettingsActivity != null) {
-                mSettingsActivity = newSettingsActivity;
-            } else {
-                mSettingsActivity =
-                        metaDataArray.getString(R.styleable.AutoFillService_settingsActivity);
-            }
+            mSettingsActivity = metaDataArray
+                    .getString(R.styleable.AutofillService_settingsActivity);
             metaDataArray.recycle();
         } else {
             mSettingsActivity = null;
@@ -96,16 +88,11 @@
     @Nullable
     private static TypedArray getMetaDataArray(PackageManager pm, ServiceInfo si) {
         // Check for permissions.
-        // TODO(b/35956626): remove check for BIND_AUTO_FILL once clients migrate
-        if (!Manifest.permission.BIND_AUTOFILL.equals(si.permission)
-                && !Manifest.permission.BIND_AUTO_FILL.equals(si.permission)) {
+        if (!Manifest.permission.BIND_AUTOFILL.equals(si.permission)) {
             Log.e(TAG, "Service does not require permission " + Manifest.permission.BIND_AUTOFILL);
             return null;
         }
 
-        // TODO(b/35956626): remove once clients migrate
-        final boolean oldStyle = !Manifest.permission.BIND_AUTOFILL.equals(si.permission);
-
         // Get the AutoFill metadata, if declared.
         XmlResourceParser parser = si.loadXmlMetaData(pm, AutofillService.SERVICE_META_DATA);
         if (parser == null) {
@@ -141,8 +128,7 @@
                 return null;
             }
 
-            return oldStyle ? res.obtainAttributes(attrs, R.styleable.AutoFillService)
-                    : res.obtainAttributes(attrs, R.styleable.AutofillService);
+            return res.obtainAttributes(attrs, R.styleable.AutofillService);
         } finally {
             parser.close();
         }
diff --git a/core/java/android/service/autofill/Dataset.java b/core/java/android/service/autofill/Dataset.java
index b7a0420..e77bd0d 100644
--- a/core/java/android/service/autofill/Dataset.java
+++ b/core/java/android/service/autofill/Dataset.java
@@ -23,8 +23,6 @@
 import android.content.IntentSender;
 import android.os.Parcel;
 import android.os.Parcelable;
-import android.view.autofill.AutoFillId;
-import android.view.autofill.AutoFillValue;
 import android.view.autofill.AutofillId;
 import android.view.autofill.AutofillValue;
 import android.widget.RemoteViews;
@@ -175,15 +173,6 @@
         }
 
         /**
-         * @hide
-         * @deprecated TODO(b/35956626): remove once clients use other setValue()
-         */
-       @Deprecated
-        public @NonNull Builder setValue(@NonNull AutoFillId id, @NonNull AutoFillValue value) {
-            return setValue(id.getDaRealId(), value.getDaRealValue());
-        }
-
-        /**
          * Sets the value of a field.
          *
          * @param id id returned by {@link
diff --git a/core/java/android/service/autofill/SaveInfo.java b/core/java/android/service/autofill/SaveInfo.java
index 6213d27..95608a5 100644
--- a/core/java/android/service/autofill/SaveInfo.java
+++ b/core/java/android/service/autofill/SaveInfo.java
@@ -25,7 +25,6 @@
 import android.os.Bundle;
 import android.os.Parcel;
 import android.os.Parcelable;
-import android.view.autofill.AutoFillId;
 import android.view.autofill.AutofillId;
 import android.view.autofill.AutofillManager;
 import android.view.autofill.AutofillValue;
@@ -269,26 +268,6 @@
             return this;
         }
 
-
-        /**
-         * @hide
-         */
-        // TODO(b/33197203): temporary fix to runtime crash
-        public @NonNull Builder addSavableIds(@Nullable AutoFillId... ids) {
-            throwIfDestroyed();
-
-            if (ids == null || ids.length == 0) {
-                return this;
-            }
-            if (mRequiredIds == null) {
-                mRequiredIds = new AutofillId[ids.length];
-            }
-            for (int i = 0; i < ids.length; i++) {
-                mRequiredIds[i] = ids[i].getDaRealId();
-            }
-            return this;
-        }
-
         /**
          * Sets an optional description to be shown in the UI when the user is asked to save.
          *