cid#1607171 Data race condition
[LibreOffice.git] / android / source / src / java / org / libreoffice / LOKitInputConnectionHandler.java
blob7b50ef5ff70764f9e9151afba02c94439369b4eb
1 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9 package org.libreoffice;
11 import android.view.KeyEvent;
12 import android.view.inputmethod.EditorInfo;
13 import android.view.inputmethod.InputConnection;
15 import org.mozilla.gecko.gfx.InputConnectionHandler;
17 /**
18 * Implementation of InputConnectionHandler. When a key event happens it is
19 * directed to this class which is then directed further to LOKitThread.
21 public class LOKitInputConnectionHandler implements InputConnectionHandler {
22 private static final String LOGTAG = LOKitInputConnectionHandler.class.getSimpleName();
24 @Override
25 public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
26 return null;
29 /**
30 * When key pre-Ime happens.
32 @Override
33 public boolean onKeyPreIme(int keyCode, KeyEvent event) {
34 return false;
37 /**
38 * When key down event happens.
40 @Override
41 public boolean onKeyDown(int keyCode, KeyEvent event) {
42 LOKitShell.sendKeyEvent(event);
43 return false;
46 /**
47 * When key long press event happens.
49 @Override
50 public boolean onKeyLongPress(int keyCode, KeyEvent event) {
51 return false;
54 /**
55 * When key multiple event happens. Key multiple event is triggered when
56 * non-ascii characters are entered on soft keyboard.
58 @Override
59 public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) {
60 LOKitShell.sendKeyEvent(event);
61 return false;
64 /**
65 * When key up event happens.
67 @Override
68 public boolean onKeyUp(int keyCode, KeyEvent event) {
69 LOKitShell.sendKeyEvent(event);
70 return false;
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */