Loading core/java/android/hardware/input/input_framework.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -56,16 +56,6 @@ flag { bug: "286551975" } flag { namespace: "input_native" name: "keyboard_layout_manager_multi_user_ime_setup" description: "Update KeyboardLayoutManager to work correctly with multi-user IME setup" bug: "354333072" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "modifier_shortcut_dump" namespace: "input" Loading services/core/java/com/android/server/input/KeyboardLayoutManager.java +4 −13 Original line number Diff line number Diff line Loading @@ -22,8 +22,6 @@ import static android.hardware.input.KeyboardLayoutSelectionResult.LAYOUT_SELECT import static android.hardware.input.KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_VIRTUAL_KEYBOARD; import static android.hardware.input.KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_DEFAULT; import static com.android.hardware.input.Flags.keyboardLayoutManagerMultiUserImeSetup; import android.annotation.AnyThread; import android.annotation.MainThread; import android.annotation.NonNull; Loading Loading @@ -68,7 +66,6 @@ import android.util.SparseArray; import android.view.InputDevice; import android.view.KeyCharacterMap; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodSubtype; import com.android.internal.R; Loading Loading @@ -1081,8 +1078,6 @@ class KeyboardLayoutManager implements InputManager.InputDeviceListener { List<ImeInfo> imeInfoList = new ArrayList<>(); UserManager userManager = Objects.requireNonNull( mContext.getSystemService(UserManager.class)); InputMethodManager inputMethodManager = Objects.requireNonNull( mContext.getSystemService(InputMethodManager.class)); // Need to use InputMethodManagerInternal to call getEnabledInputMethodListAsUser() // instead of using InputMethodManager which uses enforceCallingPermissions() that // breaks when we are calling the method for work profile user ID since it doesn't check Loading @@ -1093,14 +1088,10 @@ class KeyboardLayoutManager implements InputManager.InputDeviceListener { for (InputMethodInfo imeInfo : inputMethodManagerInternal.getEnabledInputMethodListAsUser( userId)) { final List<InputMethodSubtype> imeSubtypes; if (keyboardLayoutManagerMultiUserImeSetup()) { imeSubtypes = inputMethodManagerInternal.getEnabledInputMethodSubtypeListAsUser( imeInfo.getId(), true /* allowsImplicitlyEnabledSubtypes */, userId); } else { imeSubtypes = inputMethodManager.getEnabledInputMethodSubtypeList(imeInfo, true /* allowsImplicitlyEnabledSubtypes */); } final List<InputMethodSubtype> imeSubtypes = inputMethodManagerInternal.getEnabledInputMethodSubtypeListAsUser( imeInfo.getId(), true /* allowsImplicitlyEnabledSubtypes */, userId); for (InputMethodSubtype imeSubtype : imeSubtypes) { if (!imeSubtype.isSuitableForPhysicalKeyboardLayoutMapping()) { continue; Loading Loading
core/java/android/hardware/input/input_framework.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -56,16 +56,6 @@ flag { bug: "286551975" } flag { namespace: "input_native" name: "keyboard_layout_manager_multi_user_ime_setup" description: "Update KeyboardLayoutManager to work correctly with multi-user IME setup" bug: "354333072" metadata { purpose: PURPOSE_BUGFIX } } flag { name: "modifier_shortcut_dump" namespace: "input" Loading
services/core/java/com/android/server/input/KeyboardLayoutManager.java +4 −13 Original line number Diff line number Diff line Loading @@ -22,8 +22,6 @@ import static android.hardware.input.KeyboardLayoutSelectionResult.LAYOUT_SELECT import static android.hardware.input.KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_VIRTUAL_KEYBOARD; import static android.hardware.input.KeyboardLayoutSelectionResult.LAYOUT_SELECTION_CRITERIA_DEFAULT; import static com.android.hardware.input.Flags.keyboardLayoutManagerMultiUserImeSetup; import android.annotation.AnyThread; import android.annotation.MainThread; import android.annotation.NonNull; Loading Loading @@ -68,7 +66,6 @@ import android.util.SparseArray; import android.view.InputDevice; import android.view.KeyCharacterMap; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodSubtype; import com.android.internal.R; Loading Loading @@ -1081,8 +1078,6 @@ class KeyboardLayoutManager implements InputManager.InputDeviceListener { List<ImeInfo> imeInfoList = new ArrayList<>(); UserManager userManager = Objects.requireNonNull( mContext.getSystemService(UserManager.class)); InputMethodManager inputMethodManager = Objects.requireNonNull( mContext.getSystemService(InputMethodManager.class)); // Need to use InputMethodManagerInternal to call getEnabledInputMethodListAsUser() // instead of using InputMethodManager which uses enforceCallingPermissions() that // breaks when we are calling the method for work profile user ID since it doesn't check Loading @@ -1093,14 +1088,10 @@ class KeyboardLayoutManager implements InputManager.InputDeviceListener { for (InputMethodInfo imeInfo : inputMethodManagerInternal.getEnabledInputMethodListAsUser( userId)) { final List<InputMethodSubtype> imeSubtypes; if (keyboardLayoutManagerMultiUserImeSetup()) { imeSubtypes = inputMethodManagerInternal.getEnabledInputMethodSubtypeListAsUser( imeInfo.getId(), true /* allowsImplicitlyEnabledSubtypes */, userId); } else { imeSubtypes = inputMethodManager.getEnabledInputMethodSubtypeList(imeInfo, true /* allowsImplicitlyEnabledSubtypes */); } final List<InputMethodSubtype> imeSubtypes = inputMethodManagerInternal.getEnabledInputMethodSubtypeListAsUser( imeInfo.getId(), true /* allowsImplicitlyEnabledSubtypes */, userId); for (InputMethodSubtype imeSubtype : imeSubtypes) { if (!imeSubtype.isSuitableForPhysicalKeyboardLayoutMapping()) { continue; Loading