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

Use lambdas where possible

Summary: Let Android Studio replace anonymous types with lambdas. No manual code change.

Test Plan: Compile and superficial behaviour test

Reviewers: #kde_connect, philipc

Reviewed By: #kde_connect, philipc

Subscribers: philipc, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12229
This commit is contained in:
Nicolas Fella
2018-05-09 14:02:56 +02:00
parent 7536eb7427
commit e712c69e15
31 changed files with 1077 additions and 1615 deletions

View File

@@ -121,12 +121,7 @@ public class RemoteKeyboardPlugin extends Plugin {
releaseInstances();
}
if (RemoteKeyboardService.instance != null)
RemoteKeyboardService.instance.handler.post(new Runnable() {
@Override
public void run() {
RemoteKeyboardService.instance.updateInputView();
}
});
RemoteKeyboardService.instance.handler.post(() -> RemoteKeyboardService.instance.updateInputView());
return true;
}
@@ -137,12 +132,7 @@ public class RemoteKeyboardPlugin extends Plugin {
if (instances.contains(this)) {
instances.remove(this);
if (instances.size() < 1 && RemoteKeyboardService.instance != null)
RemoteKeyboardService.instance.handler.post(new Runnable() {
@Override
public void run() {
RemoteKeyboardService.instance.updateInputView();
}
});
RemoteKeyboardService.instance.handler.post(() -> RemoteKeyboardService.instance.updateInputView());
}
} finally {
releaseInstances();