From 6efe9ae1c073bdfbc36bd88e4d71c1b7505b39e9 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Tue, 8 Jul 2014 17:36:11 +0900 Subject: [PATCH] Remove unused keyPreviewIcon attributes This CL also removes unused tabKeyPreview icon. Change-Id: Ia69ba9c3d7c67ccb8983275bed262292eb422db2 --- .../sym_keyboard_feedback_tab.png | Bin 2341 -> 0 bytes .../sym_keyboard_feedback_tab.png | Bin 846 -> 0 bytes .../sym_keyboard_feedback_tab.png | Bin 3427 -> 0 bytes java/res/values/attrs.xml | 3 -- java/res/values/keyboard-icons-holo.xml | 1 - java/res/values/keyboard-icons-lxx-dark.xml | 1 - java/res/xml-sw600dp/key_styles_common.xml | 3 -- java/res/xml/key_styles_common.xml | 4 +-- .../com/android/inputmethod/keyboard/Key.java | 29 ++++++------------ .../keyboard/internal/KeyStylesSet.java | 1 - .../keyboard/internal/KeyboardIconsSet.java | 2 -- 11 files changed, 10 insertions(+), 34 deletions(-) delete mode 100644 java/res/drawable-hdpi/sym_keyboard_feedback_tab.png delete mode 100644 java/res/drawable-mdpi/sym_keyboard_feedback_tab.png delete mode 100644 java/res/drawable-xhdpi/sym_keyboard_feedback_tab.png diff --git a/java/res/drawable-hdpi/sym_keyboard_feedback_tab.png b/java/res/drawable-hdpi/sym_keyboard_feedback_tab.png deleted file mode 100644 index d85663bf3342d6709221856af496a90050f81ff8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2341 zcmb_edo+~m8lOaNL*z~|g(>+l! zZX?>-BDvGnj&LHHlnUjN#`S#8UT5up&iU^=YdzoZd%pF&@ArGx`u(2uW;hb9CB&4) zKp>C=!3KLCKqQb@kwd^!H%-C`0MRfT_ec;(TxLHHfQs3QAkYD76wWQmDwIZ}(4#;B zHs{Yl0)j5nFNIL(5F`Q;e32d+K_O!#ES#(e1PlZQi`Rs~IukonV6d*%uHX0HyQ*QZ z%W$Bs@rA)KokcJhEL6e<=Z1m6fiSW_p!U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%wjbn9mbUXthc7!xO2@4CGd4ib0 z>5<1?bt=_FALDhmHC-HuFEx!B&iYNvpV!nve-qKY?!C3KY$h6kx_2aYW9gW}4o~jT zV{ymVPv~^|=GXAip%SAO-(Q*;3QA&^vK7r$cDxnUDXNism1}EJNpc{yXN2stKjo;N zsY!e%ibkVr-5dh8zAws_602`ZQAmaWZsgX4ura(IMH$i$V-{J6c{1RsBYe`W4f z&=V+7r+ey1g% zNV1d!>}Y%(;NYKu!6DUq3h9MrVFei^3nCF$~yVXMkr6*E&8y85V zKPvtRYUFE_19Cn)&v9A(Fml+?z#!Zot~jG5u)m;wBBY?KtgJRKFAuQC5|~1vxL`_Q uC5PG9oN@%NJCS+0R+8W5)PRf5-rhmbqQQ7IZfgLjKp+B+h^@8sP5u|jHVQ@n diff --git a/java/res/drawable-mdpi/sym_keyboard_feedback_tab.png b/java/res/drawable-mdpi/sym_keyboard_feedback_tab.png deleted file mode 100644 index fee15807cef815344ae7c58e72909ad4afe0f178..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 846 zcmeAS@N?(olHy`uVBq!ia0vp^N4@Iy6I1PcNU>!!^Q6!2k%%9gR#uw1t6%F^G1v zbaR97T`fVhxhYuKz}3+V#5FK>w6p-xhUR8&Zj$qA7#NshJzX3_D&{2p`2XMjaKZuR zcMXBx4rF|IC0|l25T0UeRY3-shgW`=U(BG;ULSz%+4pXW6AR6&t3W3r#vp^;HdfY z<72q1>rocAB^MU%a$d7$4Hu^+3tQRyd$kA8oH@h4YUFRZ>-58WS05xp&vD zDn)_w>J87CK3+*ZJ#DVyHAMx6HM#$nEnjZVB)h2U!-Ip}5wc7rYsEF&f|&YbEQ?-$ zdwcu*2CE|%E?k%$$G5Zc^RwI1=6QRLyb?$_nNjuX%F62J=jK*(9r5RQaNMDWpTlm_ ztB!BqzP*%@kx|=S_SUNXs-nYzGYl(@k2FTKFo>}w<>~9M7fX^Y`1j}MZeVDA+|a`3 zv&Ov8vL%H<=aF|up-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3 zwRLrr@tMQPcpzGe2CE<+&#`FJnk(;Ij_VUFWcX_Q0zyMqW~QbpKC@0MC>f7~eSpFV#!X+M@yekO`b)Nx0r{EAYv zE*5lBY$ShhX{P(Wl)SPseMzCZu0oH()vc0OVe$@{FeamHxr z`6cQ|0EFKRLo_w$SB8zT12qI9w@H;BMb2r-6+n(8`79YzRD;@06?4-$p;z)7B0NijMxB^5DUV(RQBOT5enO zZPp}hk3e0irugCQIGCKAJ3b`jyLzngYgHirgA4|JWocMS=9(>P$&3k-w)36?a72xgHf=6e%O5} iKxFL70KZ9xha7B+P8uB{Hw8WeDw~-J5nqdSx%&^ZtPW2A diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index 396c166ab..64879551f 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -238,7 +238,6 @@ - @@ -331,8 +330,6 @@ - - diff --git a/java/res/values/keyboard-icons-holo.xml b/java/res/values/keyboard-icons-holo.xml index 669d2c07d..d95ff8201 100644 --- a/java/res/values/keyboard-icons-holo.xml +++ b/java/res/values/keyboard-icons-holo.xml @@ -32,7 +32,6 @@ @drawable/sym_keyboard_space_holo_dark @drawable/sym_keyboard_shift_locked_holo_dark @drawable/sym_keyboard_voice_off_holo_dark - @drawable/sym_keyboard_feedback_tab @drawable/sym_keyboard_language_switch_dark @drawable/sym_keyboard_zwnj_holo_dark @drawable/sym_keyboard_zwj_holo_dark diff --git a/java/res/values/keyboard-icons-lxx-dark.xml b/java/res/values/keyboard-icons-lxx-dark.xml index 6e9c4d1c1..7988e739e 100644 --- a/java/res/values/keyboard-icons-lxx-dark.xml +++ b/java/res/values/keyboard-icons-lxx-dark.xml @@ -38,7 +38,6 @@ @drawable/sym_keyboard_space_holo_dark @drawable/sym_keyboard_shift_locked_lxx_dark @drawable/sym_keyboard_voice_off_lxx_dark - @drawable/sym_keyboard_feedback_tab @drawable/sym_keyboard_language_switch_lxx_dark @drawable/sym_keyboard_zwnj_holo_dark @drawable/sym_keyboard_zwj_holo_dark diff --git a/java/res/xml-sw600dp/key_styles_common.xml b/java/res/xml-sw600dp/key_styles_common.xml index 7de276901..877c796c7 100644 --- a/java/res/xml-sw600dp/key_styles_common.xml +++ b/java/res/xml-sw600dp/key_styles_common.xml @@ -121,7 +121,6 @@ diff --git a/java/res/xml/key_styles_common.xml b/java/res/xml/key_styles_common.xml index 8b3bb2e5c..bc739f7d0 100644 --- a/java/res/xml/key_styles_common.xml +++ b/java/res/xml/key_styles_common.xml @@ -119,14 +119,12 @@ + latin:keySpec="!icon/tab_key|!code/key_tab" /> { public final int mAltCode; /** Icon for disabled state */ public final int mDisabledIconId; - /** Preview version of the icon, for the preview popup */ - public final int mPreviewIconId; /** The visual insets */ public final int mVisualInsetsLeft; public final int mVisualInsetsRight; private OptionalAttributes(final String outputText, final int altCode, - final int disabledIconId, final int previewIconId, - final int visualInsetsLeft, final int visualInsetsRight) { + final int disabledIconId, final int visualInsetsLeft, final int visualInsetsRight) { mOutputText = outputText; mAltCode = altCode; mDisabledIconId = disabledIconId; - mPreviewIconId = previewIconId; mVisualInsetsLeft = visualInsetsLeft; mVisualInsetsRight = visualInsetsRight; } public static OptionalAttributes newInstance(final String outputText, final int altCode, - final int disabledIconId, final int previewIconId, - final int visualInsetsLeft, final int visualInsetsRight) { + final int disabledIconId, final int visualInsetsLeft, final int visualInsetsRight) { if (outputText == null && altCode == CODE_UNSPECIFIED - && disabledIconId == ICON_UNDEFINED && previewIconId == ICON_UNDEFINED - && visualInsetsLeft == 0 && visualInsetsRight == 0) { + && disabledIconId == ICON_UNDEFINED && visualInsetsLeft == 0 + && visualInsetsRight == 0) { return null; } - return new OptionalAttributes(outputText, altCode, disabledIconId, previewIconId, - visualInsetsLeft, visualInsetsRight); + return new OptionalAttributes(outputText, altCode, disabledIconId, visualInsetsLeft, + visualInsetsRight); } } @@ -204,8 +199,7 @@ public class Key implements Comparable { mMoreKeysColumnAndFlags = 0; mLabel = label; mOptionalAttributes = OptionalAttributes.newInstance(outputText, CODE_UNSPECIFIED, - ICON_UNDEFINED, ICON_UNDEFINED, - 0 /* visualInsetsLeft */, 0 /* visualInsetsRight */); + ICON_UNDEFINED, 0 /* visualInsetsLeft */, 0 /* visualInsetsRight */); mCode = code; mEnabled = (code != CODE_UNSPECIFIED); mIconId = iconId; @@ -306,8 +300,6 @@ public class Key implements Comparable { mIconId = KeySpecParser.getIconId(keySpec); final int disabledIconId = KeySpecParser.getIconId(style.getString(keyAttr, R.styleable.Keyboard_Key_keyIconDisabled)); - final int previewIconId = KeySpecParser.getIconId(style.getString(keyAttr, - R.styleable.Keyboard_Key_keyIconPreview)); final int code = KeySpecParser.getCode(keySpec); if ((mLabelFlags & LABEL_FLAGS_FROM_CUSTOM_ACTION_LABEL) != 0) { @@ -361,7 +353,7 @@ public class Key implements Comparable { final int altCode = StringUtils.toUpperCaseOfCodeForLocale( altCodeInAttr, needsToUpperCase, locale); mOptionalAttributes = OptionalAttributes.newInstance(outputText, altCode, - disabledIconId, previewIconId, visualInsetsLeft, visualInsetsRight); + disabledIconId, visualInsetsLeft, visualInsetsRight); mKeyVisualAttributes = KeyVisualAttributes.newInstance(keyAttr); mHashCode = computeHashCode(this); } @@ -756,10 +748,7 @@ public class Key implements Comparable { } public Drawable getPreviewIcon(final KeyboardIconsSet iconSet) { - final OptionalAttributes attrs = mOptionalAttributes; - final int previewIconId = (attrs != null) ? attrs.mPreviewIconId : ICON_UNDEFINED; - return previewIconId != ICON_UNDEFINED - ? iconSet.getIconDrawable(previewIconId) : iconSet.getIconDrawable(getIconId()); + return iconSet.getIconDrawable(getIconId()); } public int getWidth() { diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyStylesSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyStylesSet.java index 0b0e761d2..5cbb34119 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyStylesSet.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyStylesSet.java @@ -141,7 +141,6 @@ public final class KeyStylesSet { readStringArray(keyAttr, R.styleable.Keyboard_Key_additionalMoreKeys); readFlags(keyAttr, R.styleable.Keyboard_Key_keyLabelFlags); readString(keyAttr, R.styleable.Keyboard_Key_keyIconDisabled); - readString(keyAttr, R.styleable.Keyboard_Key_keyIconPreview); readInt(keyAttr, R.styleable.Keyboard_Key_maxMoreKeysColumn); readInt(keyAttr, R.styleable.Keyboard_Key_backgroundType); readFlags(keyAttr, R.styleable.Keyboard_Key_keyActionFlags); diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java index 7146deb4b..09550c4cb 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardIconsSet.java @@ -48,7 +48,6 @@ public final class KeyboardIconsSet { public static final String NAME_DONE_KEY = "done_key"; public static final String NAME_PREVIOUS_KEY = "previous_key"; public static final String NAME_TAB_KEY = "tab_key"; - public static final String NANE_TAB_KEY_PREVIEW = "tab_key_preview"; public static final String NAME_SHORTCUT_KEY = "shortcut_key"; public static final String NAME_SHORTCUT_KEY_DISABLED = "shortcut_key_disabled"; public static final String NAME_LANGUAGE_SWITCH_KEY = "language_switch_key"; @@ -79,7 +78,6 @@ public final class KeyboardIconsSet { NAME_SPACE_KEY_FOR_NUMBER_LAYOUT, R.styleable.Keyboard_iconSpaceKeyForNumberLayout, NAME_SHIFT_KEY_SHIFTED, R.styleable.Keyboard_iconShiftKeyShifted, NAME_SHORTCUT_KEY_DISABLED, R.styleable.Keyboard_iconShortcutKeyDisabled, - NANE_TAB_KEY_PREVIEW, R.styleable.Keyboard_iconTabKeyPreview, NAME_LANGUAGE_SWITCH_KEY, R.styleable.Keyboard_iconLanguageSwitchKey, NAME_ZWNJ_KEY, R.styleable.Keyboard_iconZwnjKey, NAME_ZWJ_KEY, R.styleable.Keyboard_iconZwjKey,