aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/accessibility/AccessibilityEntityProvider.java13
-rw-r--r--java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java6
-rw-r--r--java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java4
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java4
4 files changed, 25 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/accessibility/AccessibilityEntityProvider.java b/java/src/com/android/inputmethod/accessibility/AccessibilityEntityProvider.java
index 9986f6ec0..ba08c593c 100644
--- a/java/src/com/android/inputmethod/accessibility/AccessibilityEntityProvider.java
+++ b/java/src/com/android/inputmethod/accessibility/AccessibilityEntityProvider.java
@@ -85,9 +85,20 @@ public class AccessibilityEntityProvider extends AccessibilityNodeProviderCompat
*/
public void setView(KeyboardView keyboardView) {
mKeyboardView = keyboardView;
+ updateParentLocation();
+
+ // Since this class is constructed lazily, we might not get a subsequent
+ // call to setKeyboard() and therefore need to call it now.
+ setKeyboard(mKeyboardView.getKeyboard());
+ }
+ /**
+ * Sets the keyboard represented by this node provider.
+ *
+ * @param keyboard The keyboard to represent.
+ */
+ public void setKeyboard(Keyboard keyboard) {
assignVirtualViewIds();
- updateParentLocation();
}
/**
diff --git a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
index 59f1eec04..f6376d5f4 100644
--- a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
+++ b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
@@ -86,6 +86,12 @@ public class AccessibleKeyboardViewProxy extends AccessibilityDelegateCompat {
}
}
+ public void setKeyboard(Keyboard keyboard) {
+ if (mAccessibilityNodeProvider != null) {
+ mAccessibilityNodeProvider.setKeyboard(keyboard);
+ }
+ }
+
/**
* Proxy method for View.getAccessibilityNodeProvider(). This method is
* called in SDK version 15 and higher to obtain the virtual node hierarchy
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index e917a8128..383298de9 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -468,6 +468,10 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
if (ProductionFlag.IS_EXPERIMENTAL) {
ResearchLogger.latinKeyboardView_setKeyboard(keyboard);
}
+
+ // This always needs to be set since the accessibility state can
+ // potentially change without the keyboard being set again.
+ AccessibleKeyboardViewProxy.getInstance().setKeyboard(keyboard);
}
/**
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index bee374b79..ea2746d00 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -969,7 +969,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final KeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
if (inputView == null || mSuggestionsContainer == null)
return;
- final int backingHeight = getAdjustedBackingViewHeight();
+ final int adjustedBackingHeight = getAdjustedBackingViewHeight();
+ final boolean backingGone = (mKeyPreviewBackingView.getVisibility() == View.GONE);
+ final int backingHeight = backingGone ? 0 : adjustedBackingHeight;
// In fullscreen mode, the height of the extract area managed by InputMethodService should
// be considered.
// See {@link android.inputmethodservice.InputMethodService#onComputeInsets}.