mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix gesture floating preview on up event
This is a follow up of Iddb26ba1. Bug: 7119032 Change-Id: Ibbc94a1a4880ca31bd8aeece89893691b14acc4d
This commit is contained in:
parent
737e915093
commit
350fab6dc4
@ -545,12 +545,15 @@ public class PointerTracker implements PointerTrackerQueue.Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startBatchInput() {
|
private void startBatchInput() {
|
||||||
if (DEBUG_LISTENER) {
|
if (!sInGesture && mGestureStrokeWithPreviewTrail.isStartOfAGesture()) {
|
||||||
Log.d(TAG, "onStartBatchInput");
|
if (DEBUG_LISTENER) {
|
||||||
|
Log.d(TAG, "onStartBatchInput");
|
||||||
|
}
|
||||||
|
sInGesture = true;
|
||||||
|
mListener.onStartBatchInput();
|
||||||
}
|
}
|
||||||
sInGesture = true;
|
final boolean isOldestTracker = sPointerTrackerQueue.getOldestElement() == this;
|
||||||
mListener.onStartBatchInput();
|
mDrawingProxy.showGesturePreviewTrail(this, isOldestTracker);
|
||||||
mDrawingProxy.showGesturePreviewTrail(this, true /* isOldestTracker */);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateBatchInput(final long eventTime) {
|
private void updateBatchInput(final long eventTime) {
|
||||||
@ -585,7 +588,8 @@ public class PointerTracker implements PointerTrackerQueue.Element {
|
|||||||
clearBatchInputPointsOfAllPointerTrackers();
|
clearBatchInputPointsOfAllPointerTrackers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mDrawingProxy.showGesturePreviewTrail(this, true /* isOldestTracker */);
|
final boolean isOldestTracker = sPointerTrackerQueue.getOldestElement() == this;
|
||||||
|
mDrawingProxy.showGesturePreviewTrail(this, isOldestTracker);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void abortBatchInput() {
|
private static void abortBatchInput() {
|
||||||
@ -721,12 +725,8 @@ public class PointerTracker implements PointerTrackerQueue.Element {
|
|||||||
final boolean isHistorical, final Key key) {
|
final boolean isHistorical, final Key key) {
|
||||||
final int gestureTime = (int)(eventTime - sGestureFirstDownTime);
|
final int gestureTime = (int)(eventTime - sGestureFirstDownTime);
|
||||||
if (mIsDetectingGesture) {
|
if (mIsDetectingGesture) {
|
||||||
final GestureStroke stroke = mGestureStrokeWithPreviewTrail;
|
mGestureStrokeWithPreviewTrail.addPoint(x, y, gestureTime, isHistorical);
|
||||||
stroke.addPoint(x, y, gestureTime, isHistorical);
|
startBatchInput();
|
||||||
if (!sInGesture && stroke.isStartOfAGesture()) {
|
|
||||||
startBatchInput();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sInGesture && key != null) {
|
if (sInGesture && key != null) {
|
||||||
updateBatchInput(eventTime);
|
updateBatchInput(eventTime);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user