2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +00:00

Run command in a separate thread

This commit is contained in:
Maxim Leshchenko
2021-06-25 01:48:20 +03:00
committed by Albert Vaca Cintora
parent 7286b8a24a
commit b74a6e6c6e

View File

@@ -95,7 +95,10 @@ class RunCommandControlsProviderService : ControlsProviderService() {
if (commandEntry != null) {
val plugin = BackgroundService.getInstance().getDevice(controlId.split("-")[0]).getPlugin(RunCommandPlugin::class.java)
if (plugin != null) {
plugin.runCommand(commandEntry.key)
BackgroundService.RunCommand(this) {
plugin.runCommand(commandEntry.key)
}
consumer.accept(ControlAction.RESPONSE_OK)
} else {
consumer.accept(ControlAction.RESPONSE_FAIL)