mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 09:58:08 +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:
parent
e9732d009a
commit
5a620b4a7a
@ -121,9 +121,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
|
||||
@ -133,7 +130,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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user