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

Commit 41789c1e authored by Felipe Leme's avatar Felipe Leme
Browse files

Removed deprecated auto(F)ill settings.

Bug: 35956626
Test: manual verification
Test: mmm -j90 packages/apps/Settings/tests/robotest
Change-Id: I5d0a02477204d273f331d8af93737c88e5af90e8
parent c8e06b3f
Loading
Loading
Loading
Loading
+0 −27
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.provider.Settings;
import android.service.autofill.AutoFillService;
import android.service.autofill.AutofillService;
import android.service.autofill.AutofillServiceInfo;
import android.text.TextUtils;
@@ -36,8 +35,6 @@ import java.util.List;
public class DefaultAutofillPicker extends DefaultAppPickerFragment {

    static final String SETTING = Settings.Secure.AUTOFILL_SERVICE;
    // TODO(b/35956626): remove once clients migrated
    static final Intent OLD_AUTO_FILL_PROBE = new Intent(AutoFillService.OLD_SERVICE_INTERFACE);
    static final Intent AUTOFILL_PROBE = new Intent(AutofillService.SERVICE_INTERFACE);

    @Override
@@ -59,12 +56,6 @@ public class DefaultAutofillPicker extends DefaultAppPickerFragment {
            candidates.add(new DefaultAppInfo(mPm, mUserId, new ComponentName(
                    info.serviceInfo.packageName, info.serviceInfo.name)));
        }
        final List<ResolveInfo> oldResolveInfos = mPm.getPackageManager()
                .queryIntentServices(OLD_AUTO_FILL_PROBE, PackageManager.GET_META_DATA);
        for (ResolveInfo info : oldResolveInfos) {
            candidates.add(new DefaultAppInfo(mPm, mUserId, new ComponentName(
                    info.serviceInfo.packageName, info.serviceInfo.name)));
        }
        return candidates;
    }

@@ -122,24 +113,6 @@ public class DefaultAutofillPicker extends DefaultAppPickerFragment {
                }
            }

            final List<ResolveInfo> oldResolveInfos = mPackageManager.queryIntentServices(
                    OLD_AUTO_FILL_PROBE, PackageManager.GET_META_DATA);

            for (ResolveInfo resolveInfo : oldResolveInfos) {
                final ServiceInfo serviceInfo = resolveInfo.serviceInfo;
                final String flattenKey = new ComponentName(
                        serviceInfo.packageName, serviceInfo.name).flattenToString();
                if (TextUtils.equals(mSelectedKey, flattenKey)) {
                    final String settingsActivity = new AutofillServiceInfo(
                            mPackageManager, serviceInfo)
                            .getSettingsActivity();
                    if (TextUtils.isEmpty(settingsActivity)) {
                        return null;
                    }
                    return new Intent(Intent.ACTION_MAIN).setComponent(
                            new ComponentName(serviceInfo.packageName, settingsActivity));
                }
            }
            return null;
        }
    }