From 41789c1e0333c416dc2060e0f884a8e2f393a123 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Tue, 4 Apr 2017 16:39:21 -0700 Subject: [PATCH] Removed deprecated auto(F)ill settings. Bug: 35956626 Test: manual verification Test: mmm -j90 packages/apps/Settings/tests/robotest Change-Id: I5d0a02477204d273f331d8af93737c88e5af90e8 --- .../defaultapps/DefaultAutofillPicker.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java b/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java index ce9344f8b29..d943de7ab13 100644 --- a/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java +++ b/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java @@ -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 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 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; } }