Don't show autofill settings if not enabled
The non-indexable keys of language-and-input on my angler are: game_controller_settings_category, gesture_assist, gesture_double_tap_screen, default_autofill Fixes: 35956220 Test: Disabled auto-fill and looked at settings: did not find autofill button and could not find auto-fill in search Settings robolectric test Change-Id: I0923e707422d1b1de5153a63fa3a5fe4773c055d
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user