Index: sky/shell/org/domokit/sky/shell/PlatformView.java |
diff --git a/sky/shell/org/domokit/sky/shell/PlatformView.java b/sky/shell/org/domokit/sky/shell/PlatformView.java |
index a4b98cd5fbf9a31a7d8794f65d87c38baa2ab5cc..ee94f3f8b223812dead6e1f95d33abf3fdbd9ce5 100644 |
--- a/sky/shell/org/domokit/sky/shell/PlatformView.java |
+++ b/sky/shell/org/domokit/sky/shell/PlatformView.java |
@@ -10,6 +10,8 @@ import android.view.Surface; |
import android.view.SurfaceHolder; |
import android.view.SurfaceView; |
import android.view.View; |
+import android.view.inputmethod.EditorInfo; |
+import android.view.inputmethod.InputConnection; |
import org.chromium.base.JNINamespace; |
import org.chromium.mojo.bindings.InterfaceRequest; |
@@ -21,6 +23,7 @@ import org.chromium.mojom.sky.InputEvent; |
import org.chromium.mojom.sky.PointerData; |
import org.chromium.mojom.sky.PointerKind; |
import org.chromium.mojom.sky.ViewportObserver; |
+import org.domokit.keyboard.KeyboardServiceImpl; |
/** |
* A view containing Sky |
@@ -68,6 +71,7 @@ public class PlatformView extends SurfaceView |
getHolder().addCallback(mSurfaceCallback); |
mGestureProvider = new GestureProvider(context, this); |
+ KeyboardServiceImpl.setActiveView(this); |
} |
@Override |
@@ -86,6 +90,16 @@ public class PlatformView extends SurfaceView |
} |
} |
+ @Override |
+ public boolean onCheckIsTextEditor() { |
+ return true; |
+ } |
+ |
+ @Override |
+ public InputConnection onCreateInputConnection(EditorInfo outAttrs) { |
+ return KeyboardServiceImpl.createInputConnection(outAttrs); |
+ } |
+ |
private int getTypeForAction(int maskedAction) { |
// Primary pointer: |
if (maskedAction == MotionEvent.ACTION_DOWN) |