Merge "Fix testNonIndexableKeys_existInXmlLayout" into udc-dev

This commit is contained in:
Treehugger Robot
2023-05-04 03:15:40 +00:00
committed by Android (Google) Code Review

View File

@@ -32,6 +32,7 @@ import android.content.Context;
import android.content.res.Resources;
import android.hardware.input.InputManager;
import android.os.UserManager;
import android.util.FeatureFlagUtils;
import android.view.autofill.AutofillManager;
import android.view.inputmethod.InputMethodManager;
import android.view.textservice.TextServicesManager;
@@ -119,6 +120,7 @@ public class LanguageAndInputSettingsTest {
final Resources res = spy(RuntimeEnvironment.application.getResources());
final InputManager inputManager = mock(InputManager.class);
final TextServicesManager textServicesManager = mock(TextServicesManager.class);
FeatureFlagUtils.setEnabled(context, FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_UI, false);
when(inputManager.getInputDeviceIds()).thenReturn(new int[0]);
doReturn(inputManager).when(context).getSystemService(Context.INPUT_SERVICE);
doReturn(textServicesManager).when(context)