mirror of
https://invent.kde.org/network/kdeconnect-android.git
synced 2025-12-12 20:35:58 +01:00
Convert trivial class to Kotlin
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015 David Edmundson <kde@davidedmundson.co.uk>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
|
||||
package org.kde.kdeconnect.Plugins.MousePadPlugin;
|
||||
|
||||
import android.view.inputmethod.BaseInputConnection;
|
||||
|
||||
class KeyInputConnection extends BaseInputConnection {
|
||||
private final KeyListenerView view;
|
||||
|
||||
public KeyInputConnection(KeyListenerView targetView, boolean fullEditor) {
|
||||
super(targetView, fullEditor);
|
||||
view = targetView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean commitText(CharSequence text, int newCursorPosition) {
|
||||
view.sendChars(text);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015 David Edmundson <kde@davidedmundson.co.uk>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
*/
|
||||
package org.kde.kdeconnect.Plugins.MousePadPlugin
|
||||
|
||||
import android.view.inputmethod.BaseInputConnection
|
||||
|
||||
internal class KeyInputConnection(private val view: KeyListenerView, fullEditor: Boolean) :
|
||||
BaseInputConnection(view, fullEditor) {
|
||||
|
||||
override fun commitText(text: CharSequence, newCursorPosition: Int): Boolean {
|
||||
view.sendChars(text)
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user