mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-03 07:35:08 +00:00
Better exception handling in sendMessage
This commit is contained in:
@@ -491,7 +491,8 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
ArrayList<BaseLink> mLinks = new ArrayList<BaseLink>(links);
|
||||
|
||||
boolean success = false;
|
||||
for(BaseLink link : mLinks) {
|
||||
try {
|
||||
for (BaseLink link : mLinks) {
|
||||
if (useEncryption) {
|
||||
success = link.sendPackageEncrypted(np, publicKey);
|
||||
} else {
|
||||
@@ -499,6 +500,11 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
}
|
||||
if (success) break;
|
||||
}
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e("sendPackage","Error while sending package");
|
||||
success = false;
|
||||
}
|
||||
|
||||
if (success) {
|
||||
// Log.e("sendPackage","Package sent");
|
||||
|
Reference in New Issue
Block a user