Merge "Don't show autofill settings if not enabled" into oc-dev

This commit is contained in:
TreeHugger Robot
2017-04-27 16:43:20 +00:00
committed by Android (Google) Code Review
6 changed files with 141 additions and 9 deletions

View File

@@ -21,16 +21,25 @@ import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.autofill.AutofillManager;
import com.android.settings.applications.AutofillManagerWrapper;
import com.android.settings.applications.AutofillManagerWrapperImpl;
public class DefaultAutofillPreferenceController extends DefaultAppPreferenceController {
private AutofillManagerWrapper mAutofillManager;
public DefaultAutofillPreferenceController(Context context) {
super(context);
mAutofillManager = new AutofillManagerWrapperImpl(
mContext.getSystemService(AutofillManager.class));
}
@Override
public boolean isAvailable() {
return true;
return mAutofillManager.hasAutofillFeature()
&& mAutofillManager.isAutofillSupported();
}
@Override