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

Clear PointerTracker state when more keys keyboard is dismissed

With accessibility mode on, hover events for a more keys keyboard are
handled among MoreKeysKeyboardAccessibilityDelegate and
MoreKeysKeyboardView. But the more keys keyboard is shown by
MainKeyboardAccessibilityDelegate that uses PointerTracker to handle
hover events. Thus we need to clear PointerTracker state when the more
keys keyboard is dismissed.

This is a workaround to resolve the issue. We should reconsider the
structure of those views and accessibility delegates in the future.

Bug: 15583751
Change-Id: Ida8c3e55194c59bdaa5bc4ff06068e699b888ced
parent 03eba092
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
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