Convert trivial class to Kotlin

This commit is contained in:
Albert Vaca Cintora
2025-12-06 21:33:11 +01:00
parent 2e9d667e18
commit 8d8ece0055
2 changed files with 18 additions and 24 deletions

View File

@@ -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;
}
}

View File

@@ -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
}
}