Merge "Cancel all ongoing event when onFinishInputView"
commit
c34933828e
|
@ -1206,15 +1206,18 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
eventTag + eventTime + "," + id + "," + x + "," + y + "," + size + "," + pressure);
|
eventTag + eventTime + "," + id + "," + x + "," + y + "," + size + "," + pressure);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancelAllMessages() {
|
public void cancelAllOngoingEvents() {
|
||||||
mKeyTimerHandler.cancelAllMessages();
|
mKeyTimerHandler.cancelAllMessages();
|
||||||
mDrawingHandler.cancelAllMessages();
|
mDrawingHandler.cancelAllMessages();
|
||||||
|
dismissAllKeyPreviews();
|
||||||
|
dismissGestureFloatingPreviewText();
|
||||||
|
dismissSlidingKeyInputPreview();
|
||||||
|
PointerTracker.dismissAllMoreKeysPanels();
|
||||||
|
PointerTracker.cancelAllPointerTrackers();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closing() {
|
public void closing() {
|
||||||
dismissAllKeyPreviews();
|
cancelAllOngoingEvents();
|
||||||
cancelAllMessages();
|
|
||||||
PointerTracker.dismissAllMoreKeysPanels();
|
|
||||||
mMoreKeysKeyboardCache.clear();
|
mMoreKeysKeyboardCache.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -413,6 +413,10 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
|
||||||
return sPointerTrackerQueue.isAnyInSlidingKeyInput();
|
return sPointerTrackerQueue.isAnyInSlidingKeyInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void cancelAllPointerTrackers() {
|
||||||
|
sPointerTrackerQueue.cancelAllPointerTrackers();
|
||||||
|
}
|
||||||
|
|
||||||
public static void setKeyboardActionListener(final KeyboardActionListener listener) {
|
public static void setKeyboardActionListener(final KeyboardActionListener listener) {
|
||||||
final int trackersSize = sTrackers.size();
|
final int trackersSize = sTrackers.size();
|
||||||
for (int i = 0; i < trackersSize; ++i) {
|
for (int i = 0; i < trackersSize; ++i) {
|
||||||
|
@ -833,7 +837,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cancelBatchInput() {
|
private void cancelBatchInput() {
|
||||||
sPointerTrackerQueue.cancelAllPointerTracker();
|
cancelAllPointerTrackers();
|
||||||
mIsDetectingGesture = false;
|
mIsDetectingGesture = false;
|
||||||
if (!sInGesture) {
|
if (!sInGesture) {
|
||||||
return;
|
return;
|
||||||
|
@ -1273,7 +1277,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
|
||||||
}
|
}
|
||||||
|
|
||||||
cancelBatchInput();
|
cancelBatchInput();
|
||||||
sPointerTrackerQueue.cancelAllPointerTracker();
|
cancelAllPointerTrackers();
|
||||||
sPointerTrackerQueue.releaseAllPointers(eventTime);
|
sPointerTrackerQueue.releaseAllPointers(eventTime);
|
||||||
onCancelEventInternal();
|
onCancelEventInternal();
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,7 +207,7 @@ public final class PointerTrackerQueue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancelAllPointerTracker() {
|
public void cancelAllPointerTrackers() {
|
||||||
synchronized (mExpandableArrayOfActivePointers) {
|
synchronized (mExpandableArrayOfActivePointers) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.d(TAG, "cancelAllPointerTracker: " + this);
|
Log.d(TAG, "cancelAllPointerTracker: " + this);
|
||||||
|
|
|
@ -886,7 +886,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
mKeyboardSwitcher.onFinishInputView();
|
mKeyboardSwitcher.onFinishInputView();
|
||||||
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
|
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
|
||||||
if (mainKeyboardView != null) {
|
if (mainKeyboardView != null) {
|
||||||
mainKeyboardView.cancelAllMessages();
|
mainKeyboardView.cancelAllOngoingEvents();
|
||||||
}
|
}
|
||||||
// Remove pending messages related to update suggestions
|
// Remove pending messages related to update suggestions
|
||||||
mHandler.cancelUpdateSuggestionStrip();
|
mHandler.cancelUpdateSuggestionStrip();
|
||||||
|
|
Loading…
Reference in New Issue