summaryrefslogtreecommitdiff
path: root/src/us/minak/IMEService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/us/minak/IMEService.java')
-rw-r--r--src/us/minak/IMEService.java40
1 files changed, 2 insertions, 38 deletions
diff --git a/src/us/minak/IMEService.java b/src/us/minak/IMEService.java
index a0a9ece..f8a3660 100644
--- a/src/us/minak/IMEService.java
+++ b/src/us/minak/IMEService.java
@@ -1,52 +1,16 @@
-/*
- ********************************************************************************
- * Copyright (c) 2012 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information of Samsung
- * Electronics, Inc. ("Confidential Information"). You shall not disclose such
- * Confidential Information and shall use it only in accordance with the terms
- * of the license agreement you entered into with Samsung Electronics.
- ********************************************************************************
- */
-
package us.minak;
-import java.util.Queue;
-
import android.inputmethodservice.InputMethodService;
import android.view.View;
-import android.view.inputmethod.EditorInfo;
/**
* Represent the application input service.
*/
-public class IMEService extends InputMethodService {
- private IMEView mIMEView;
-
+public class IMEService extends InputMethodService implements InputConnectionGetter {
@Override
public View onCreateInputView() {
final IMEView minakView = (IMEView) getLayoutInflater().inflate(R.layout.ime, null);
-
- minakView.setOnCharacterEnteredListener(new StringReciever() {
- @Override
- public void putString(String character) {
- getCurrentInputConnection().commitText(character, 1);
- }
- });
-
- mIMEView = minakView;
+ minakView.setInputConnectionGetter(this);
return minakView;
}
-
- @Override
- public void onStartInput(EditorInfo attribute, boolean restarting) {
- if (mIMEView != null) {
- final Queue<Character> symbolsQueue = mIMEView.getSymbolsQueue();
- while (!symbolsQueue.isEmpty()) {
- final Character character = symbolsQueue.poll();
- getCurrentInputConnection().commitText(String.valueOf(character), 1);
- }
- }
- }
}