Cosmetic code optimization

Change-Id: If20c1936c8d5f23f0b86d02f21f4ff8a6444244c
main
Tadashi G. Takaoka 2013-07-25 15:41:49 +09:00
parent 665e4ecc62
commit 5b696d8336
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) {