Skip to content
Snippets Groups Projects
Commit 87104bac authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Dismiss the more suggestions when the user is sliding down the touch point

Bug: 5299142
Change-Id: I466ff41948bbb49fb6874817ecfd94d338238d19
parent cd15b930
No related branches found
No related tags found
No related merge requests found
......@@ -792,11 +792,10 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
final int translatedY = moreKeysPanel.translateY(y);
if (mCheckingIfModalOrSlidingMode) {
final int deltaX = Math.abs(x - mOriginX);
final int deltaY = Math.abs(y - mOriginY);
if (deltaX >= mMoreSuggestionsModalTolerance
|| deltaY >= mMoreSuggestionsModalTolerance) {
// Decided to be in the sliding input mode
if (Math.abs(x - mOriginX) >= mMoreSuggestionsModalTolerance
|| mOriginY - y >= mMoreSuggestionsModalTolerance) {
// Decided to be in the sliding input mode only when the touch point has been moved
// upward.
mCheckingIfModalOrSlidingMode = false;
tracker.onShowMoreKeysPanel(
translatedX, translatedY, SystemClock.uptimeMillis(), moreKeysPanel);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment