2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 18:07:55 +00:00

don't wait for future get as its blocking

This commit is contained in:
Aditya Mehra 2023-05-10 17:44:33 +09:30
parent 93883f02ed
commit 796fa20aec

View File

@ -395,12 +395,8 @@ public class SMSPlugin extends Plugin {
switch (np.getType()) {
case PACKET_TYPE_SMS_REQUEST_CONVERSATIONS:
Callable<Boolean> callable = () -> this.handleRequestAllConversations(np);
Future future = ThreadHelper.executeCallable(callable);
try {
return (boolean) future.get();
} catch (InterruptedException | ExecutionException e) {
Log.d("SMSPlugin", "Error while getting result from callable: " + e.getMessage());
}
ThreadHelper.executeCallable(callable);
return true;
case PACKET_TYPE_SMS_REQUEST_CONVERSATION:
return this.handleRequestSingleConversation(np);