Bug 786240 - Null-check LayerView when sending accessibility event. r=mbrubeck

This commit is contained in:
Eitan Isaacson 2012-08-30 10:54:49 -07:00
parent 695f096c60
commit 41be4b75f1

View File

@ -111,6 +111,9 @@ public class GeckoAccessibility {
// In Jelly Bean we populate an AccessibilityNodeInfo with the minimal amount of data to have
// it work with TalkBack.
final LayerView view = GeckoApp.mAppContext.getLayerView();
if (view == null)
return;
if (mVirtualCursorNode == null)
mVirtualCursorNode = AccessibilityNodeInfo.obtain(view, VIRTUAL_CURSOR_POSITION);
mVirtualCursorNode.setEnabled(message.optBoolean("enabled", true));