| Index: services/keyboard/org/chromium/mojo/keyboard/KeyboardServiceImpl.java
|
| diff --git a/sky/services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java b/services/keyboard/org/chromium/mojo/keyboard/KeyboardServiceImpl.java
|
| similarity index 80%
|
| rename from sky/services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java
|
| rename to services/keyboard/org/chromium/mojo/keyboard/KeyboardServiceImpl.java
|
| index 645cbf12efbb59f97a2751d2a85a4037bce6d8fe..36d53b717b4d954c0c0f167d579346d3db1cc9f0 100644
|
| --- a/sky/services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java
|
| +++ b/services/keyboard/org/chromium/mojo/keyboard/KeyboardServiceImpl.java
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -package org.domokit.keyboard;
|
| +package org.chromium.mojo.keyboard;
|
|
|
| import android.content.Context;
|
| import android.view.View;
|
| @@ -25,6 +25,11 @@ public class KeyboardServiceImpl implements KeyboardService {
|
|
|
| private Context mContext;
|
|
|
| + public KeyboardServiceImpl(Context context, MessagePipeHandle pipe) {
|
| + mContext = context;
|
| + KeyboardService.MANAGER.bind(this, pipe);
|
| + }
|
| +
|
| public KeyboardServiceImpl(Context context, Core core, MessagePipeHandle pipe) {
|
| mContext = context;
|
|
|
| @@ -36,13 +41,17 @@ public class KeyboardServiceImpl implements KeyboardService {
|
| }
|
|
|
| public static InputConnection createInputConnection(EditorInfo outAttrs) {
|
| - if (sActiveClient == null)
|
| - return null;
|
| + if (sActiveClient == null) return null;
|
| return new InputConnectionAdaptor(sActiveView, sActiveClient, outAttrs);
|
| }
|
|
|
| @Override
|
| - public void close() {}
|
| + public void close() {
|
| + if (sActiveClient != null) {
|
| + sActiveClient.close();
|
| + sActiveClient = null;
|
| + }
|
| + }
|
|
|
| @Override
|
| public void onConnectionError(MojoException e) {}
|
| @@ -60,5 +69,7 @@ public class KeyboardServiceImpl implements KeyboardService {
|
| InputMethodManager imm =
|
| (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
|
| imm.hideSoftInputFromWindow(sActiveView.getApplicationWindowToken(), 0);
|
| + sActiveClient.close();
|
| + sActiveClient = null;
|
| }
|
| }
|
|
|