From a9341c38e3a3e38ebf6de1803304026b84d4c15d Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Wed, 30 Mar 2016 11:45:00 -0700 Subject: [PATCH] Remove gear icon from InputMethodPreference. Per comment from UX, we do not show gear icons on InputMethodPreference because there is no difference between tapping the item itself and tapping the gear icon. Bug: 27543291 Change-Id: Ieea9a13a4b7af9c90c3a2a8f365bd318663998b1 --- .../settings/inputmethod/InputMethodPreference.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/android/settings/inputmethod/InputMethodPreference.java b/src/com/android/settings/inputmethod/InputMethodPreference.java index 3d6e7dced7c..f3737499e9d 100755 --- a/src/com/android/settings/inputmethod/InputMethodPreference.java +++ b/src/com/android/settings/inputmethod/InputMethodPreference.java @@ -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