Loading res/values/strings.xml +2 −2 Original line number Diff line number Diff line Loading @@ -3616,8 +3616,8 @@ <string name="virtual_keyboard_category">Virtual keyboard</string> <!-- Title for the 'available virtual keyboard' preference sub-screen. [CHAR LIMIT=35] --> <string name="available_virtual_keyboard_category">Available virtual keyboard</string> <!-- Title for the button to trigger the 'available virtual keyboard' preference sub-screen. [CHAR LIMIT=35] --> <string name="add_virtual_keyboard">Add a virtual keyboard</string> <!-- Title for the button to trigger the 'Add or edit virtual keyboards' preference sub-screen. [CHAR LIMIT=35] --> <string name="add_virtual_keyboard">Add or edit virtual keyboards</string> <!-- Title for the 'keyboard assistance' preference category. [CHAR LIMIT=35] --> <string name="keyboard_assistance_category">Keyboard assistance</string> <!-- Title for the 'physical keyboard' settings screen. [CHAR LIMIT=35] --> Loading src/com/android/settings/inputmethod/InputMethodPreference.java +4 −4 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref OnPreferenceChangeListener { private static final String TAG = InputMethodPreference.class.getSimpleName(); private static final String EMPTY_TEXT = ""; private static final int SETTINGS_ICON_LAYOUT = R.layout.preference_settings_icon_widget; private static final int NO_WIDGET = 0; interface OnSavePreferenceListener { /** Loading Loading @@ -99,8 +99,8 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref mIsAllowedByOrganization = isAllowedByOrganization; mOnSaveListener = onSaveListener; if (!isImeEnabler) { // Replace switch widget with settings icon. setWidgetLayoutResource(SETTINGS_ICON_LAYOUT); // Remove switch widget. setWidgetLayoutResource(NO_WIDGET); } // Disable on/off switch texts. setSwitchTextOn(EMPTY_TEXT); Loading Loading @@ -130,7 +130,7 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref private boolean isImeEnabler() { // If this {@link SwitchPreference} doesn't have a widget layout, we explicitly hide the // switch widget at constructor. return getWidgetLayoutResource() != SETTINGS_ICON_LAYOUT; return getWidgetLayoutResource() != NO_WIDGET; } @Override Loading Loading
res/values/strings.xml +2 −2 Original line number Diff line number Diff line Loading @@ -3616,8 +3616,8 @@ <string name="virtual_keyboard_category">Virtual keyboard</string> <!-- Title for the 'available virtual keyboard' preference sub-screen. [CHAR LIMIT=35] --> <string name="available_virtual_keyboard_category">Available virtual keyboard</string> <!-- Title for the button to trigger the 'available virtual keyboard' preference sub-screen. [CHAR LIMIT=35] --> <string name="add_virtual_keyboard">Add a virtual keyboard</string> <!-- Title for the button to trigger the 'Add or edit virtual keyboards' preference sub-screen. [CHAR LIMIT=35] --> <string name="add_virtual_keyboard">Add or edit virtual keyboards</string> <!-- Title for the 'keyboard assistance' preference category. [CHAR LIMIT=35] --> <string name="keyboard_assistance_category">Keyboard assistance</string> <!-- Title for the 'physical keyboard' settings screen. [CHAR LIMIT=35] --> Loading
src/com/android/settings/inputmethod/InputMethodPreference.java +4 −4 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref OnPreferenceChangeListener { private static final String TAG = InputMethodPreference.class.getSimpleName(); private static final String EMPTY_TEXT = ""; private static final int SETTINGS_ICON_LAYOUT = R.layout.preference_settings_icon_widget; private static final int NO_WIDGET = 0; interface OnSavePreferenceListener { /** Loading Loading @@ -99,8 +99,8 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref mIsAllowedByOrganization = isAllowedByOrganization; mOnSaveListener = onSaveListener; if (!isImeEnabler) { // Replace switch widget with settings icon. setWidgetLayoutResource(SETTINGS_ICON_LAYOUT); // Remove switch widget. setWidgetLayoutResource(NO_WIDGET); } // Disable on/off switch texts. setSwitchTextOn(EMPTY_TEXT); Loading Loading @@ -130,7 +130,7 @@ class InputMethodPreference extends RestrictedSwitchPreference implements OnPref private boolean isImeEnabler() { // If this {@link SwitchPreference} doesn't have a widget layout, we explicitly hide the // switch widget at constructor. return getWidgetLayoutResource() != SETTINGS_ICON_LAYOUT; return getWidgetLayoutResource() != NO_WIDGET; } @Override Loading