Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java

Issue 1088793003: Expose sky KeyboardService in android mojo_shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java
diff --git a/sky/services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java b/services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java
similarity index 88%
rename from sky/services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java
rename to services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java
index 645cbf12efbb59f97a2751d2a85a4037bce6d8fe..2e2099035bfd0e60e52c658c2f9378b8f6fc7d2d 100644
--- a/sky/services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java
+++ b/services/keyboard/org/domokit/keyboard/KeyboardServiceImpl.java
@@ -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,8 +41,7 @@ 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);
}
@@ -60,5 +64,7 @@ public class KeyboardServiceImpl implements KeyboardService {
InputMethodManager imm =
(InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(sActiveView.getApplicationWindowToken(), 0);
+ sActiveClient.close();
+ sActiveClient = null;
}
}

Powered by Google App Engine
This is Rietveld 408576698