Merge "Cosmetic code optimization"

main
Tadashi G. Takaoka 2013-07-25 07:29:01 +00:00 committed by Android (Google) Code Review
commit 058f37f8ba
2 changed files with 3 additions and 9 deletions

View File

@ -29,7 +29,6 @@ import android.view.inputmethod.EditorInfo;
import com.android.inputmethod.accessibility.AccessibleKeyboardViewProxy;
import com.android.inputmethod.keyboard.KeyboardLayoutSet.KeyboardLayoutSetException;
import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
import com.android.inputmethod.keyboard.internal.KeyboardState;
import com.android.inputmethod.latin.InputView;
import com.android.inputmethod.latin.LatinIME;
@ -274,8 +273,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
public void startDoubleTapShiftKeyTimer() {
final MainKeyboardView keyboardView = getMainKeyboardView();
if (keyboardView != null) {
final TimerProxy timer = keyboardView.getTimerProxy();
timer.startDoubleTapShiftKeyTimer();
keyboardView.getTimerProxy().startDoubleTapShiftKeyTimer();
}
}
@ -284,8 +282,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
public void cancelDoubleTapShiftKeyTimer() {
final MainKeyboardView keyboardView = getMainKeyboardView();
if (keyboardView != null) {
final TimerProxy timer = keyboardView.getTimerProxy();
timer.cancelDoubleTapShiftKeyTimer();
keyboardView.getTimerProxy().cancelDoubleTapShiftKeyTimer();
}
}
@ -293,8 +290,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
@Override
public boolean isInDoubleTapShiftKeyTimeout() {
final MainKeyboardView keyboardView = getMainKeyboardView();
return (keyboardView != null)
? keyboardView.getTimerProxy().isInDoubleTapShiftKeyTimeout() : false;
return keyboardView != null && keyboardView.getTimerProxy().isInDoubleTapShiftKeyTimeout();
}
/**

View File

@ -775,8 +775,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
private static final int STATE_RIGHT = 2;
private static final int STATE_NORMAL = 0;
private static final int STATE_HAS_MOREKEYS = 1;
private static final int[] KEY_PREVIEW_BACKGROUND_DEFAULT_STATE =
KEY_PREVIEW_BACKGROUND_STATE_TABLE[STATE_MIDDLE][STATE_NORMAL];
@Override
public void showKeyPreview(final PointerTracker tracker) {