Remove wrapper class for AutofillManager in Settings

Robolectric now supports new system services. So we no longer need any
wrapper class.

Bug: 76167422
Test: robotests
Change-Id: Ic54b95f747bea933bacec299b00a29f3cc4f7bb5
This commit is contained in:
Fan Zhang
2018-03-30 14:33:55 -07:00
parent e645558049
commit 19b9f120db
3 changed files with 6 additions and 67 deletions

View File

@@ -23,22 +23,22 @@ import android.provider.Settings;
import android.text.TextUtils;
import android.view.autofill.AutofillManager;
import com.android.settings.wrapper.AutofillManagerWrapper;
import com.android.settingslib.applications.DefaultAppInfo;
public class DefaultAutofillPreferenceController extends DefaultAppPreferenceController {
private AutofillManagerWrapper mAutofillManager;
private final AutofillManager mAutofillManager;
public DefaultAutofillPreferenceController(Context context) {
super(context);
mAutofillManager = new AutofillManagerWrapper(
mContext.getSystemService(AutofillManager.class));
mAutofillManager = mContext.getSystemService(AutofillManager.class);
}
@Override
public boolean isAvailable() {
return mAutofillManager.hasAutofillFeature()
return mAutofillManager != null
&& mAutofillManager.hasAutofillFeature()
&& mAutofillManager.isAutofillSupported();
}