IMM#showInputMethodPickerFromSystem for supporting multi-display.
Derived from IMM#showInputMethodPicker(bool) @hide function, rename it as
showInputMethodPickerFromSystem and added displayId parameter to let
system caller can deside which display to show input method picker dialog.
Bug: 120050928
Test: manual, verify the IME switcher dialog can be shown on the external
display when:
1) Launch CryptKeeper activity to the external display via command:
adb shell am start -e "com.android.settings.CryptKeeper.DEBUG_FORCE_VIEW" \
"password" -n com.android.settings/.CryptKeeper --display 1 --windowingMode 1
2) Pressing the IME switcher button in CryptKeeper activity.
Test: atest InputMethodManagerTest#testShowInputMethodPicker
Change-Id: I58f4e7b00eb271d426ba5b1125e9f129dac53f1d
This commit is contained in:
@@ -773,9 +773,10 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
|
||||
if (imeSwitcher != null && hasMultipleEnabledIMEsOrSubtypes(imm, false)) {
|
||||
imeSwitcher.setVisibility(View.VISIBLE);
|
||||
imeSwitcher.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
imm.showInputMethodPicker(false /* showAuxiliarySubtypes */);
|
||||
imm.showInputMethodPickerFromSystem(false /* showAuxiliarySubtypes */,
|
||||
v.getDisplay().getDisplayId());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user