2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 14:15:14 +00:00

Start the timer before the packet has been sent

Fixes the loopback provider starting the timer after the paring is
already done, causing it to unpair after 30 seconds.
This commit is contained in:
Albert Vaca Cintora
2023-06-02 19:43:46 +02:00
parent b14df9d09c
commit 8c1fe000f6

View File

@@ -120,9 +120,6 @@ public class PairingHandler {
mPairState = PairState.Requested;
Device.SendPacketStatusCallback statusCallback = new Device.SendPacketStatusCallback() {
@Override
public void onSuccess() {
mPairingTimer = new Timer();
mPairingTimer.schedule(new TimerTask() {
@Override
@@ -132,7 +129,10 @@ public class PairingHandler {
mCallback.pairingFailed(mDevice.getContext().getString(R.string.error_timed_out));
}
}, 30*1000); //Time to wait for the other to accept
}
Device.SendPacketStatusCallback statusCallback = new Device.SendPacketStatusCallback() {
@Override
public void onSuccess() { }
@Override
public void onFailure(Throwable e) {