Merge "Remove unnecessary variables"
commit
abf81192ff
|
@ -127,9 +127,6 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
private static final int MSG_TYPING_STATE_EXPIRED = 4;
|
private static final int MSG_TYPING_STATE_EXPIRED = 4;
|
||||||
|
|
||||||
private final KeyTimerParams mParams;
|
private final KeyTimerParams mParams;
|
||||||
// TODO: Suppress layout changes in key repeat mode
|
|
||||||
// TODO: Remove this variable.
|
|
||||||
private boolean mInKeyRepeat;
|
|
||||||
|
|
||||||
public KeyTimerHandler(LatinKeyboardView outerInstance, KeyTimerParams params) {
|
public KeyTimerHandler(LatinKeyboardView outerInstance, KeyTimerParams params) {
|
||||||
super(outerInstance);
|
super(outerInstance);
|
||||||
|
@ -165,7 +162,6 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
private void startKeyRepeatTimer(PointerTracker tracker, long delay) {
|
private void startKeyRepeatTimer(PointerTracker tracker, long delay) {
|
||||||
final Key key = tracker.getKey();
|
final Key key = tracker.getKey();
|
||||||
if (key == null) return;
|
if (key == null) return;
|
||||||
mInKeyRepeat = true;
|
|
||||||
sendMessageDelayed(obtainMessage(MSG_REPEAT_KEY, key.mCode, 0, tracker), delay);
|
sendMessageDelayed(obtainMessage(MSG_REPEAT_KEY, key.mCode, 0, tracker), delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,12 +171,12 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancelKeyRepeatTimer() {
|
public void cancelKeyRepeatTimer() {
|
||||||
mInKeyRepeat = false;
|
|
||||||
removeMessages(MSG_REPEAT_KEY);
|
removeMessages(MSG_REPEAT_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Suppress layout changes in key repeat mode
|
||||||
public boolean isInKeyRepeat() {
|
public boolean isInKeyRepeat() {
|
||||||
return mInKeyRepeat;
|
return hasMessages(MSG_REPEAT_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -148,10 +148,6 @@ public class PointerTracker {
|
||||||
// true if this pointer has been long-pressed and is showing a more keys panel.
|
// true if this pointer has been long-pressed and is showing a more keys panel.
|
||||||
private boolean mIsShowingMoreKeysPanel;
|
private boolean mIsShowingMoreKeysPanel;
|
||||||
|
|
||||||
// TODO: Remove this variable.
|
|
||||||
// true if this pointer is repeatable key
|
|
||||||
private boolean mIsRepeatableKey;
|
|
||||||
|
|
||||||
// true if this pointer is in sliding key input
|
// true if this pointer is in sliding key input
|
||||||
boolean mIsInSlidingKeyInput;
|
boolean mIsInSlidingKeyInput;
|
||||||
|
|
||||||
|
@ -529,7 +525,6 @@ public class PointerTracker {
|
||||||
|| mKeyDetector.alwaysAllowsSlidingInput();
|
|| mKeyDetector.alwaysAllowsSlidingInput();
|
||||||
mKeyboardLayoutHasBeenChanged = false;
|
mKeyboardLayoutHasBeenChanged = false;
|
||||||
mKeyAlreadyProcessed = false;
|
mKeyAlreadyProcessed = false;
|
||||||
mIsRepeatableKey = false;
|
|
||||||
mIsInSlidingKeyInput = false;
|
mIsInSlidingKeyInput = false;
|
||||||
mIgnoreModifierKey = false;
|
mIgnoreModifierKey = false;
|
||||||
if (key != null) {
|
if (key != null) {
|
||||||
|
@ -676,7 +671,7 @@ public class PointerTracker {
|
||||||
}
|
}
|
||||||
if (mKeyAlreadyProcessed)
|
if (mKeyAlreadyProcessed)
|
||||||
return;
|
return;
|
||||||
if (!mIsRepeatableKey) {
|
if (mCurrentKey != null && !mCurrentKey.isRepeatable()) {
|
||||||
detectAndSendKey(mCurrentKey, mKeyX, mKeyY);
|
detectAndSendKey(mCurrentKey, mKeyX, mKeyY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -722,9 +717,6 @@ public class PointerTracker {
|
||||||
if (key != null && key.isRepeatable()) {
|
if (key != null && key.isRepeatable()) {
|
||||||
onRegisterKey(key);
|
onRegisterKey(key);
|
||||||
mTimerProxy.startKeyRepeatTimer(this);
|
mTimerProxy.startKeyRepeatTimer(this);
|
||||||
mIsRepeatableKey = true;
|
|
||||||
} else {
|
|
||||||
mIsRepeatableKey = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue