mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 14:15:14 +00:00
Only unpair when receiving unknown packages if I'm not requesting pairing
In case the other device thinks we are paired and answers my identity packet with unexpected stuff.
This commit is contained in:
@@ -475,12 +475,7 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
for (PairingCallback cb : pairingCallback) cb.unpaired();
|
||||
|
||||
}
|
||||
} else if (!isPaired()) {
|
||||
|
||||
unpair();
|
||||
Log.e("onPackageReceived","Device not paired, ignoring package!");
|
||||
|
||||
} else {
|
||||
} else if (isPaired()) {
|
||||
|
||||
for (Plugin plugin : plugins.values()) {
|
||||
try {
|
||||
@@ -491,6 +486,15 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Log.e("onPackageReceived","Device not paired, ignoring package!");
|
||||
|
||||
if (pairStatus != PairStatus.Requested) {
|
||||
unpair();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user