Loading src/com/android/settings/inputmethod/AvailableVirtualKeyboardFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ public class AvailableVirtualKeyboardFragment extends DashboardFragment final Context prefContext = getPrefContext(); final List<InputMethodInfo> imis = mInputMethodSettingValues.getInputMethodList(); final List<InputMethodInfo> enabledImis = getContext().getSystemService( InputMethodManager.class).getEnabledInputMethodListAsUser(mUserId); InputMethodManager.class).getEnabledInputMethodListAsUser(UserHandle.of(mUserId)); final int numImis = (imis == null ? 0 : imis.size()); for (int i = 0; i < numImis; ++i) { final InputMethodInfo imi = imis.get(i); Loading src/com/android/settings/inputmethod/NewKeyboardLayoutEnabledLocalesFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -145,7 +145,8 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment PreferenceScreen preferenceScreen = getPreferenceScreen(); preferenceScreen.removeAll(); List<InputMethodInfo> infoList = mImm.getEnabledInputMethodListAsUser(mUserId); List<InputMethodInfo> infoList = mImm.getEnabledInputMethodListAsUser(UserHandle.of(mUserId)); Collections.sort(infoList, new Comparator<InputMethodInfo>() { public int compare(InputMethodInfo o1, InputMethodInfo o2) { String s1 = o1.loadLabel(mContext.getPackageManager()).toString(); Loading @@ -157,7 +158,8 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment for (InputMethodInfo info : infoList) { mKeyboardInfoList.clear(); List<InputMethodSubtype> subtypes = mImm.getEnabledInputMethodSubtypeListAsUser(info.getId(), true, mUserId); mImm.getEnabledInputMethodSubtypeListAsUser(info.getId(), true, UserHandle.of(mUserId)); for (InputMethodSubtype subtype : subtypes) { if (subtype.isSuitableForPhysicalKeyboardLayoutMapping()) { mapLanguageWithLayout(info, subtype); Loading src/com/android/settings/inputmethod/NewKeyboardSettingsUtils.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.hardware.input.InputDeviceIdentifier; import android.hardware.input.InputManager; import android.hardware.input.KeyboardLayout; import android.os.UserHandle; import android.view.InputDevice; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; Loading Loading @@ -55,7 +56,7 @@ public class NewKeyboardSettingsUtils { static List<String> getSuitableImeLabels(Context context, InputMethodManager imm, int userId) { List<String> suitableInputMethodInfoLabels = new ArrayList<>(); List<InputMethodInfo> infoList = imm.getEnabledInputMethodListAsUser(userId); List<InputMethodInfo> infoList = imm.getEnabledInputMethodListAsUser(UserHandle.of(userId)); for (InputMethodInfo info : infoList) { List<InputMethodSubtype> subtypes = imm.getEnabledInputMethodSubtypeList(info, true); Loading tests/robotests/src/com/android/settings/inputmethod/AvailableVirtualKeyboardFragmentTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -23,11 +23,11 @@ import static com.google.common.truth.Truth.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.mockito.Mockito.mock; import android.content.Context; import android.content.pm.ApplicationInfo; Loading Loading @@ -159,7 +159,7 @@ public class AvailableVirtualKeyboardFragmentTest { mFragment.updateInputMethodPreferenceViews(); verify(mValuesWrapper).getInputMethodList(); verify(mInputMethodManager).getEnabledInputMethodListAsUser(anyInt()); verify(mInputMethodManager).getEnabledInputMethodListAsUser(any(UserHandle.class)); } @Test Loading Loading
src/com/android/settings/inputmethod/AvailableVirtualKeyboardFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ public class AvailableVirtualKeyboardFragment extends DashboardFragment final Context prefContext = getPrefContext(); final List<InputMethodInfo> imis = mInputMethodSettingValues.getInputMethodList(); final List<InputMethodInfo> enabledImis = getContext().getSystemService( InputMethodManager.class).getEnabledInputMethodListAsUser(mUserId); InputMethodManager.class).getEnabledInputMethodListAsUser(UserHandle.of(mUserId)); final int numImis = (imis == null ? 0 : imis.size()); for (int i = 0; i < numImis; ++i) { final InputMethodInfo imi = imis.get(i); Loading
src/com/android/settings/inputmethod/NewKeyboardLayoutEnabledLocalesFragment.java +4 −2 Original line number Diff line number Diff line Loading @@ -145,7 +145,8 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment PreferenceScreen preferenceScreen = getPreferenceScreen(); preferenceScreen.removeAll(); List<InputMethodInfo> infoList = mImm.getEnabledInputMethodListAsUser(mUserId); List<InputMethodInfo> infoList = mImm.getEnabledInputMethodListAsUser(UserHandle.of(mUserId)); Collections.sort(infoList, new Comparator<InputMethodInfo>() { public int compare(InputMethodInfo o1, InputMethodInfo o2) { String s1 = o1.loadLabel(mContext.getPackageManager()).toString(); Loading @@ -157,7 +158,8 @@ public class NewKeyboardLayoutEnabledLocalesFragment extends DashboardFragment for (InputMethodInfo info : infoList) { mKeyboardInfoList.clear(); List<InputMethodSubtype> subtypes = mImm.getEnabledInputMethodSubtypeListAsUser(info.getId(), true, mUserId); mImm.getEnabledInputMethodSubtypeListAsUser(info.getId(), true, UserHandle.of(mUserId)); for (InputMethodSubtype subtype : subtypes) { if (subtype.isSuitableForPhysicalKeyboardLayoutMapping()) { mapLanguageWithLayout(info, subtype); Loading
src/com/android/settings/inputmethod/NewKeyboardSettingsUtils.java +2 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.hardware.input.InputDeviceIdentifier; import android.hardware.input.InputManager; import android.hardware.input.KeyboardLayout; import android.os.UserHandle; import android.view.InputDevice; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; Loading Loading @@ -55,7 +56,7 @@ public class NewKeyboardSettingsUtils { static List<String> getSuitableImeLabels(Context context, InputMethodManager imm, int userId) { List<String> suitableInputMethodInfoLabels = new ArrayList<>(); List<InputMethodInfo> infoList = imm.getEnabledInputMethodListAsUser(userId); List<InputMethodInfo> infoList = imm.getEnabledInputMethodListAsUser(UserHandle.of(userId)); for (InputMethodInfo info : infoList) { List<InputMethodSubtype> subtypes = imm.getEnabledInputMethodSubtypeList(info, true); Loading
tests/robotests/src/com/android/settings/inputmethod/AvailableVirtualKeyboardFragmentTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -23,11 +23,11 @@ import static com.google.common.truth.Truth.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.mockito.Mockito.mock; import android.content.Context; import android.content.pm.ApplicationInfo; Loading Loading @@ -159,7 +159,7 @@ public class AvailableVirtualKeyboardFragmentTest { mFragment.updateInputMethodPreferenceViews(); verify(mValuesWrapper).getInputMethodList(); verify(mInputMethodManager).getEnabledInputMethodListAsUser(anyInt()); verify(mInputMethodManager).getEnabledInputMethodListAsUser(any(UserHandle.class)); } @Test Loading