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

Better exception handling in sendMessage

This commit is contained in:
Albert Vaca
2014-04-15 22:17:27 +02:00
parent a79e8f83ce
commit 76fd6d1e08

View File

@@ -491,6 +491,7 @@ public class Device implements BaseLink.PackageReceiver {
ArrayList<BaseLink> mLinks = new ArrayList<BaseLink>(links);
boolean success = false;
try {
for (BaseLink link : mLinks) {
if (useEncryption) {
success = link.sendPackageEncrypted(np, publicKey);
@@ -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");