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

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

Merge "Removed deprecated auto(F)ill classes." into oc-dev

parents 8c9f966e f78e952d
Loading
Loading
Loading
Loading
+0 −41
Original line number Diff line number Diff line
@@ -27,9 +27,6 @@ import android.view.ViewStructure.HtmlInfo;
import android.view.ViewStructure.HtmlInfo.Builder;
import android.view.WindowManager;
import android.view.WindowManagerGlobal;
import android.view.autofill.AutoFillId;
import android.view.autofill.AutoFillType;
import android.view.autofill.AutoFillValue;
import android.view.autofill.AutofillId;
import android.view.autofill.AutofillValue;

@@ -919,15 +916,6 @@ public class AssistStructure implements Parcelable {
            return mIdEntry;
        }

        /**
         * @hide
         * @deprecated TODO(b/35956626): remove once clients use getAutoFilltype
         */
        @Deprecated
        public AutoFillId getAutoFillId() {
            return AutoFillId.forDaRealId(mAutofillId);
        }

        /**
         * Gets the id that can be used to autofill the view contents.
         *
@@ -938,26 +926,6 @@ public class AssistStructure implements Parcelable {
            return mAutofillId;
        }

        /**
         * @hide
         * @deprecated TODO(b/35956626): remove once clients use getAutoFilltype()
         */
        @Deprecated
        public AutoFillType getAutoFillType() {
            switch (getAutofillType()) {
                case View.AUTOFILL_TYPE_TEXT:
                    return AutoFillType.forText();
                case View.AUTOFILL_TYPE_TOGGLE:
                    return AutoFillType.forToggle();
                case View.AUTOFILL_TYPE_LIST:
                    return AutoFillType.forList();
                case View.AUTOFILL_TYPE_DATE:
                    return AutoFillType.forDate();
                default:
                    return null;
            }
        }

        /**
         * Gets the the type of value that can be used to autofill the view contents.
         *
@@ -981,15 +949,6 @@ public class AssistStructure implements Parcelable {
            return mAutofillHints;
        }

        /**
         * @hide
         * @deprecated TODO(b/35956626): remove once clients use getAutoFilltype
         */
        @Deprecated
        public AutoFillValue getAutoFillValue() {
            return AutoFillValue.forDaRealValue(mAutofillValue);
        }

        /**
         * Gets the the value of this view.
         *
+0 −24
Original line number Diff line number Diff line
/*
 * 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 {
}
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public abstract class AutofillService extends Service {
     * 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"
+4 −18
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ import com.android.internal.R;

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 @@ public final class AutofillServiceInfo {
        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 @@ public final class AutofillServiceInfo {
    @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 @@ public final class AutofillServiceInfo {
                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();
        }
+0 −11
Original line number Diff line number Diff line
@@ -23,8 +23,6 @@ import android.annotation.Nullable;
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;
@@ -174,15 +172,6 @@ public final class Dataset implements Parcelable {
            return this;
        }

        /**
         * @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.
         *
Loading