Removed deprecated auto(F)ill settings.

Bug: 35956626
Test: manual verification
Test: mmm -j90 packages/apps/Settings/tests/robotest
Change-Id: I5d0a02477204d273f331d8af93737c88e5af90e8
This commit is contained in:
Felipe Leme
2017-04-04 16:39:21 -07:00
parent c8e06b3fb6
commit 41789c1e03

View File

@@ -22,7 +22,6 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo; import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo; import android.content.pm.ServiceInfo;
import android.provider.Settings; import android.provider.Settings;
import android.service.autofill.AutoFillService;
import android.service.autofill.AutofillService; import android.service.autofill.AutofillService;
import android.service.autofill.AutofillServiceInfo; import android.service.autofill.AutofillServiceInfo;
import android.text.TextUtils; import android.text.TextUtils;
@@ -36,8 +35,6 @@ import java.util.List;
public class DefaultAutofillPicker extends DefaultAppPickerFragment { public class DefaultAutofillPicker extends DefaultAppPickerFragment {
static final String SETTING = Settings.Secure.AUTOFILL_SERVICE; 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); static final Intent AUTOFILL_PROBE = new Intent(AutofillService.SERVICE_INTERFACE);
@Override @Override
@@ -59,12 +56,6 @@ public class DefaultAutofillPicker extends DefaultAppPickerFragment {
candidates.add(new DefaultAppInfo(mPm, mUserId, new ComponentName( candidates.add(new DefaultAppInfo(mPm, mUserId, new ComponentName(
info.serviceInfo.packageName, info.serviceInfo.name))); 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; 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; return null;
} }
} }