Merge changes Ieea9a13a,Id2ae6151 into nyc-dev

am: 5ffbf2e

* commit '5ffbf2e39d8ce5bb4f1256564fe060534541c710':
  Remove gear icon from InputMethodPreference.
  Update title to "Add or edit virtual keyboards".

Change-Id: Ideeeb1062a62ed77a7d178c80469effa0c3ade7c
This commit is contained in:
Yohei Yukawa
2016-03-31 06:21:39 +00:00
committed by android-build-merger
2 changed files with 6 additions and 6 deletions

View File

@@ -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] -->

View File

@@ -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 {
/**
@@ -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);
@@ -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