Remove PointerTracker reference from accessibility package

Change-Id: I1a88d9fc4db437070778ea1256aae17c32428729
This commit is contained in:
Tadashi G. Takaoka 2013-12-20 12:07:33 +09:00
parent c34b4c0744
commit 6a23b9e3d5
2 changed files with 7 additions and 5 deletions

View file

@ -29,10 +29,10 @@ import android.view.ViewParent;
import android.view.accessibility.AccessibilityEvent;
import com.android.inputmethod.keyboard.Key;
import com.android.inputmethod.keyboard.KeyDetector;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardId;
import com.android.inputmethod.keyboard.MainKeyboardView;
import com.android.inputmethod.keyboard.PointerTracker;
import com.android.inputmethod.latin.R;
public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateCompat {
@ -220,9 +220,11 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp
* Receives hover events when touch exploration is turned on in SDK versions ICS and higher.
*
* @param event The hover event.
* @param keyDetector The {@link KeyDetector} to determine on which key the <code>event</code>
* is hovering.
* @return {@code true} if the event is handled
*/
public boolean dispatchHoverEvent(final MotionEvent event, final PointerTracker tracker) {
public boolean dispatchHoverEvent(final MotionEvent event, final KeyDetector keyDetector) {
if (mView == null) {
return false;
}
@ -233,7 +235,7 @@ public final class AccessibleKeyboardViewProxy extends AccessibilityDelegateComp
final Key key;
if (pointInView(x, y)) {
key = tracker.getKeyOn(x, y);
key = keyDetector.detectHitKey(x, y);
} else {
key = null;
}

View file

@ -1039,8 +1039,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
@Override
public boolean dispatchHoverEvent(final MotionEvent event) {
if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
final PointerTracker tracker = PointerTracker.getPointerTracker(0);
return AccessibleKeyboardViewProxy.getInstance().dispatchHoverEvent(event, tracker);
return AccessibleKeyboardViewProxy.getInstance().dispatchHoverEvent(
event, mKeyDetector);
}
// Reflection doesn't support calling superclass methods.