From 3201e986473f18ed13e1e3dad87c2ecde1d3edc8 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 5 Jun 2013 14:30:16 +0900 Subject: [PATCH] Remove unnecessary Drawable.setState Change-Id: I362933ea4d5bcb1ccfebb5b22f6ccecf12337f4b --- .../com/android/inputmethod/keyboard/MainKeyboardView.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index 2e8772635..7f335027f 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -808,10 +808,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack final KeyDrawParams drawParams = mKeyDrawParams; previewText.setTextColor(drawParams.mPreviewTextColor); final Drawable background = previewText.getBackground(); - if (background != null) { - background.setState(KEY_PREVIEW_BACKGROUND_DEFAULT_STATE); - background.setAlpha(PREVIEW_ALPHA); - } final String label = key.getPreviewLabel(); // What we show as preview should match what we show on a key top in onDraw(). if (label != null) { @@ -865,6 +861,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack if (background != null) { final int hasMoreKeys = (key.mMoreKeys != null) ? STATE_HAS_MOREKEYS : STATE_NORMAL; background.setState(KEY_PREVIEW_BACKGROUND_STATE_TABLE[statePosition][hasMoreKeys]); + background.setAlpha(PREVIEW_ALPHA); } ViewLayoutUtils.placeViewAt( previewText, previewX, previewY, previewWidth, previewHeight);