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 Merged-In: I0923e707422d1b1de5153a63fa3a5fe4773c055d Change-Id: I0923e707422d1b1de5153a63fa3a5fe4773c055d
This commit is contained in:
@@ -31,6 +31,7 @@ import android.content.pm.PackageManager;
|
||||
import android.hardware.input.InputManager;
|
||||
import android.os.UserManager;
|
||||
import android.provider.Settings;
|
||||
import android.view.autofill.AutofillManager;
|
||||
import android.view.inputmethod.InputMethodInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.view.textservice.TextServicesManager;
|
||||
@@ -72,6 +73,8 @@ public class LanguageAndInputSettingsTest {
|
||||
private DevicePolicyManager mDpm;
|
||||
@Mock
|
||||
private InputMethodManager mInputMethodManager;
|
||||
@Mock
|
||||
private AutofillManager mAutofillManager;
|
||||
private TestFragment mFragment;
|
||||
|
||||
@Before
|
||||
@@ -84,6 +87,7 @@ public class LanguageAndInputSettingsTest {
|
||||
.thenReturn(mock(TextServicesManager.class));
|
||||
when(mContext.getSystemService(Context.DEVICE_POLICY_SERVICE)).thenReturn(mDpm);
|
||||
when(mContext.getSystemService(Context.INPUT_METHOD_SERVICE)).thenReturn(mImm);
|
||||
when(mContext.getSystemService(AutofillManager.class)).thenReturn(mAutofillManager);
|
||||
mFragment = new TestFragment(mContext);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user