diff options
Diffstat (limited to 'android')
-rw-r--r-- | android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java b/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java index a3eb4d64dcc9..5c5433062db1 100644 --- a/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java +++ b/android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java @@ -45,6 +45,7 @@ public class Desktop /* implementend by vcl */ public static native void renderVCL(Bitmap bitmap); public static native void setViewSize(int width, int height); + public static native void key(char c, short timestamp); /** * This class contains the state that is initialized once and never changes @@ -217,6 +218,10 @@ public class Desktop @Override public boolean commitText(CharSequence text, int newCursorPosition) { Log.i(TAG, "commitText(" + text + ", " + newCursorPosition + ")"); + short timestamp = (short) (System.currentTimeMillis() % Short.MAX_VALUE); + for (int i = 0; i < text.length(); i++) { + Desktop.key(text.charAt(i), timestamp); + } return true; } } |