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

* commit '08199ec85932dbcfd02763a88d32b4c33f94ef31':
  Clear PointerTracker state when more keys keyboard is dismissed
This commit is contained in:
Tadashi G. Takaoka 2014-06-13 07:35:02 +00:00 committed by Android Git Automerger
commit c0cbfa716a

View file

@ -23,6 +23,7 @@ import android.view.MotionEvent;
import com.android.inputmethod.keyboard.Key; import com.android.inputmethod.keyboard.Key;
import com.android.inputmethod.keyboard.KeyDetector; import com.android.inputmethod.keyboard.KeyDetector;
import com.android.inputmethod.keyboard.MoreKeysKeyboardView; 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 * 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 // Invoke {@link MoreKeysKeyboardView#onUpEvent(int,int,int,long)} as if this hover
// exit event selects a key. // exit event selects a key.
mKeyboardView.onUpEvent(x, y, pointerId, eventTime); 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; return;
} }
// Close the more keys keyboard. // 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); sendWindowStateChanged(mCloseAnnounceResId);
} }
} }