mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 13:17:43 +00:00
Don't connect to myself
This commit is contained in:
parent
a9c137cf98
commit
ec7333dc9a
@ -145,6 +145,11 @@ public class BroadcastTcpLinkProvider extends BaseLinkProvider {
|
||||
if (!np.getType().equals(NetworkPackage.PACKAGE_TYPE_IDENTITY)) {
|
||||
Log.e("BroadcastTcpLinkProvider", "1 Expecting an identity package");
|
||||
return;
|
||||
} else {
|
||||
String myId = NetworkPackage.createIdentityPackage(context).getString("deviceId");
|
||||
if (np.getType().equals(myId)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Log.e("BroadcastTcpLinkProvider", "It is an identity package, creating link");
|
||||
|
@ -104,8 +104,9 @@ public class NetworkPackage {
|
||||
jo.put("version",mVersion);
|
||||
} catch(Exception e) {
|
||||
}
|
||||
Log.e("NetworkPackage.serialize",jo.toString()+"\n");
|
||||
return jo.toString();
|
||||
String json = jo.toString()+"\n";
|
||||
Log.e("NetworkPackage.serialize",json);
|
||||
return json;
|
||||
}
|
||||
|
||||
static public NetworkPackage unserialize(String s) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user