am 2da73365
: am ae3ad8eb
: (DO NOT MERGE) Fix checking a11y status just before calling an a11y method
* commit '2da7336536a8e72f6e7d138d7b2580c077176345': (DO NOT MERGE) Fix checking a11y status just before calling an a11y method
This commit is contained in:
commit
6d23337f6d
4 changed files with 15 additions and 9 deletions
|
@ -756,7 +756,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
public void onHideWindow() {
|
public void onHideWindow() {
|
||||||
onDismissMoreKeysPanel();
|
onDismissMoreKeysPanel();
|
||||||
final MainKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
|
final MainKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
|
||||||
if (accessibilityDelegate != null) {
|
if (accessibilityDelegate != null
|
||||||
|
&& AccessibilityUtils.getInstance().isAccessibilityEnabled()) {
|
||||||
accessibilityDelegate.onHideWindow();
|
accessibilityDelegate.onHideWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -767,7 +768,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
@Override
|
@Override
|
||||||
public boolean onHoverEvent(final MotionEvent event) {
|
public boolean onHoverEvent(final MotionEvent event) {
|
||||||
final MainKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
|
final MainKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
|
||||||
if (accessibilityDelegate != null) {
|
if (accessibilityDelegate != null
|
||||||
|
&& AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
|
||||||
return accessibilityDelegate.onHoverEvent(event);
|
return accessibilityDelegate.onHoverEvent(event);
|
||||||
}
|
}
|
||||||
return super.onHoverEvent(event);
|
return super.onHoverEvent(event);
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
|
||||||
super.setKeyboard(keyboard);
|
super.setKeyboard(keyboard);
|
||||||
mKeyDetector.setKeyboard(
|
mKeyDetector.setKeyboard(
|
||||||
keyboard, -getPaddingLeft(), -getPaddingTop() + getVerticalCorrection());
|
keyboard, -getPaddingLeft(), -getPaddingTop() + getVerticalCorrection());
|
||||||
if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
|
if (AccessibilityUtils.getInstance().isAccessibilityEnabled()) {
|
||||||
if (mAccessibilityDelegate == null) {
|
if (mAccessibilityDelegate == null) {
|
||||||
mAccessibilityDelegate = new MoreKeysKeyboardAccessibilityDelegate(
|
mAccessibilityDelegate = new MoreKeysKeyboardAccessibilityDelegate(
|
||||||
this, mKeyDetector);
|
this, mKeyDetector);
|
||||||
|
@ -142,7 +142,8 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
|
||||||
mOriginY = y + container.getPaddingTop();
|
mOriginY = y + container.getPaddingTop();
|
||||||
controller.onShowMoreKeysPanel(this);
|
controller.onShowMoreKeysPanel(this);
|
||||||
final MoreKeysKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
|
final MoreKeysKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
|
||||||
if (accessibilityDelegate != null) {
|
if (accessibilityDelegate != null
|
||||||
|
&& AccessibilityUtils.getInstance().isAccessibilityEnabled()) {
|
||||||
accessibilityDelegate.onShowMoreKeysKeyboard();
|
accessibilityDelegate.onShowMoreKeysKeyboard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,7 +240,8 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final MoreKeysKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
|
final MoreKeysKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
|
||||||
if (accessibilityDelegate != null) {
|
if (accessibilityDelegate != null
|
||||||
|
&& AccessibilityUtils.getInstance().isAccessibilityEnabled()) {
|
||||||
accessibilityDelegate.onDismissMoreKeysKeyboard();
|
accessibilityDelegate.onDismissMoreKeysKeyboard();
|
||||||
}
|
}
|
||||||
mController.onDismissMoreKeysPanel();
|
mController.onDismissMoreKeysPanel();
|
||||||
|
@ -285,7 +287,8 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
|
||||||
@Override
|
@Override
|
||||||
public boolean onHoverEvent(final MotionEvent event) {
|
public boolean onHoverEvent(final MotionEvent event) {
|
||||||
final MoreKeysKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
|
final MoreKeysKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
|
||||||
if (accessibilityDelegate != null) {
|
if (accessibilityDelegate != null
|
||||||
|
&& AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
|
||||||
return accessibilityDelegate.onHoverEvent(event);
|
return accessibilityDelegate.onHoverEvent(event);
|
||||||
}
|
}
|
||||||
return super.onHoverEvent(event);
|
return super.onHoverEvent(event);
|
||||||
|
|
|
@ -104,7 +104,8 @@ final class EmojiPageKeyboardView extends KeyboardView implements
|
||||||
public boolean onHoverEvent(final MotionEvent event) {
|
public boolean onHoverEvent(final MotionEvent event) {
|
||||||
final KeyboardAccessibilityDelegate<EmojiPageKeyboardView> accessibilityDelegate =
|
final KeyboardAccessibilityDelegate<EmojiPageKeyboardView> accessibilityDelegate =
|
||||||
mAccessibilityDelegate;
|
mAccessibilityDelegate;
|
||||||
if (accessibilityDelegate != null) {
|
if (accessibilityDelegate != null
|
||||||
|
&& AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
|
||||||
return accessibilityDelegate.onHoverEvent(event);
|
return accessibilityDelegate.onHoverEvent(event);
|
||||||
}
|
}
|
||||||
return super.onHoverEvent(event);
|
return super.onHoverEvent(event);
|
||||||
|
|
|
@ -408,8 +408,8 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
||||||
// Decided to be in the sliding suggestion mode only when the touch point has been moved
|
// Decided to be in the sliding suggestion mode only when the touch point has been moved
|
||||||
// upward. Further {@link MotionEvent}s will be delivered to
|
// upward. Further {@link MotionEvent}s will be delivered to
|
||||||
// {@link #onTouchEvent(MotionEvent)}.
|
// {@link #onTouchEvent(MotionEvent)}.
|
||||||
mNeedsToTransformTouchEventToHoverEvent = AccessibilityUtils.getInstance()
|
mNeedsToTransformTouchEventToHoverEvent =
|
||||||
.isTouchExplorationEnabled();
|
AccessibilityUtils.getInstance().isTouchExplorationEnabled();
|
||||||
mIsDispatchingHoverEventToMoreSuggestions = false;
|
mIsDispatchingHoverEventToMoreSuggestions = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue