Adjusted Settings to use updated internal InputMethodManager methods
IMM#isStylusHandwritingAvailableAsUser, IMM#getEnabledInputMethodListAsUser, and IMM#getEnabledInputMethodSubtypeListAsUser use now UserHandle instead of userId. These internal APIs are used in Settings and are updated. Test: atest android.view.inputmethod.cts.installtests.MultiUserTest Fix: 283765791 Change-Id: Iedb301fbe26810f2101cbb2669b8be95b87a3e7f
This commit is contained in:
@@ -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();
|
||||
@@ -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);
|
||||
|
Reference in New Issue
Block a user