mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-03 15:45:10 +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();
|
for (PairingCallback cb : pairingCallback) cb.unpaired();
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (!isPaired()) {
|
} else if (isPaired()) {
|
||||||
|
|
||||||
unpair();
|
|
||||||
Log.e("onPackageReceived","Device not paired, ignoring package!");
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
for (Plugin plugin : plugins.values()) {
|
for (Plugin plugin : plugins.values()) {
|
||||||
try {
|
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