am f8233ec3: Merge "Refresh Accessibility key mapping when KeyboardView changes Keyboards." into jb-dev
* commit 'f8233ec32d7ff4cf0874cfe68cef1a32f763184a': Refresh Accessibility key mapping when KeyboardView changes Keyboards.main
commit
6b0d0fa350
|
@ -85,9 +85,20 @@ public class AccessibilityEntityProvider extends AccessibilityNodeProviderCompat
|
||||||
*/
|
*/
|
||||||
public void setView(KeyboardView keyboardView) {
|
public void setView(KeyboardView keyboardView) {
|
||||||
mKeyboardView = keyboardView;
|
mKeyboardView = keyboardView;
|
||||||
|
|
||||||
assignVirtualViewIds();
|
|
||||||
updateParentLocation();
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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
|
* Proxy method for View.getAccessibilityNodeProvider(). This method is
|
||||||
* called in SDK version 15 and higher to obtain the virtual node hierarchy
|
* called in SDK version 15 and higher to obtain the virtual node hierarchy
|
||||||
|
|
|
@ -468,6 +468,10 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
ResearchLogger.latinKeyboardView_setKeyboard(keyboard);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue