am 08199ec8: Clear PointerTracker state when more keys keyboard is dismissed

* commit '08199ec85932dbcfd02763a88d32b4c33f94ef31':
  Clear PointerTracker state when more keys keyboard is dismissed
main
Tadashi G. Takaoka 2014-06-13 07:35:02 +00:00 committed by Android Git Automerger
commit c0cbfa716a
1 changed files with 7 additions and 2 deletions

View File

@ -23,6 +23,7 @@ import android.view.MotionEvent;
import com.android.inputmethod.keyboard.Key;
import com.android.inputmethod.keyboard.KeyDetector;
import com.android.inputmethod.keyboard.MoreKeysKeyboardView;
import com.android.inputmethod.keyboard.PointerTracker;
/**
* This class represents a delegate that can be registered in {@link MoreKeysKeyboardView} to
@ -102,11 +103,15 @@ public class MoreKeysKeyboardAccessibilityDelegate
// Invoke {@link MoreKeysKeyboardView#onUpEvent(int,int,int,long)} as if this hover
// exit event selects a key.
mKeyboardView.onUpEvent(x, y, pointerId, eventTime);
mKeyboardView.dismissMoreKeysPanel();
// TODO: Should fix this reference. This is a hack to clear the state of
// {@link PointerTracker}.
PointerTracker.dismissAllMoreKeysPanels();
return;
}
// Close the more keys keyboard.
mKeyboardView.dismissMoreKeysPanel();
// TODO: Should fix this reference. This is a hack to clear the state of
// {@link PointerTracker}.
PointerTracker.dismissAllMoreKeysPanels();
sendWindowStateChanged(mCloseAnnounceResId);
}
}