Modify PK Settings page to make it more user friendly
PK Settings page:
- Show current PK layout selected for the current user profile and current IME language instead of a list of IMEs
PK layout mapping page:
- Show IME name in header only if multiple active IMEs
- Show the PK layout selection criteria (Automatic v/s User selected)
Bug: 325925410
Bug: 326195401
Test: manual
Change-Id: I93a2e169742a800fa116fa5d55e1a91e5548cebb
This commit is contained in:
@@ -21,6 +21,7 @@ import android.content.Context;
|
||||
import android.hardware.input.InputDeviceIdentifier;
|
||||
import android.hardware.input.InputManager;
|
||||
import android.hardware.input.KeyboardLayout;
|
||||
import android.hardware.input.KeyboardLayoutSelectionResult;
|
||||
import android.os.Bundle;
|
||||
import android.view.inputmethod.InputMethodInfo;
|
||||
import android.view.inputmethod.InputMethodSubtype;
|
||||
@@ -201,13 +202,13 @@ public class NewKeyboardLayoutPickerController extends BasePreferenceController
|
||||
|
||||
private String getSelectedLayoutLabel() {
|
||||
String label = mContext.getString(R.string.keyboard_default_layout);
|
||||
String layout = NewKeyboardSettingsUtils.getKeyboardLayout(
|
||||
KeyboardLayoutSelectionResult result = NewKeyboardSettingsUtils.getKeyboardLayout(
|
||||
mIm, mUserId, mInputDeviceIdentifier, mInputMethodInfo, mInputMethodSubtype);
|
||||
KeyboardLayout[] keyboardLayouts = NewKeyboardSettingsUtils.getKeyboardLayouts(
|
||||
mIm, mUserId, mInputDeviceIdentifier, mInputMethodInfo, mInputMethodSubtype);
|
||||
if (layout != null) {
|
||||
if (result.getLayoutDescriptor() != null) {
|
||||
for (KeyboardLayout keyboardLayout : keyboardLayouts) {
|
||||
if (keyboardLayout.getDescriptor().equals(layout)) {
|
||||
if (keyboardLayout.getDescriptor().equals(result.getLayoutDescriptor())) {
|
||||
label = keyboardLayout.getLabel();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user