diff --git a/src/org/kde/kdeconnect/Backends/LanBackend/LanPairingHandler.java b/src/org/kde/kdeconnect/Backends/LanBackend/LanPairingHandler.java index 84caa8c5..d98ba716 100644 --- a/src/org/kde/kdeconnect/Backends/LanBackend/LanPairingHandler.java +++ b/src/org/kde/kdeconnect/Backends/LanBackend/LanPairingHandler.java @@ -181,8 +181,8 @@ public class LanPairingHandler extends BasePairingHandler { public void hidePairingNotification() { mDevice.hidePairingNotification(); - if (pairingTimer != null) { - pairingTimer.cancel(); + if (mPairingTimer != null) { + mPairingTimer .cancel(); } } diff --git a/src/org/kde/kdeconnect/BackgroundService.java b/src/org/kde/kdeconnect/BackgroundService.java index e9a36f01..bc305c79 100644 --- a/src/org/kde/kdeconnect/BackgroundService.java +++ b/src/org/kde/kdeconnect/BackgroundService.java @@ -163,7 +163,7 @@ public class BackgroundService extends Service { private void cleanDevices() { for(Device d : devices.values()) { - if (!d.isPaired() && !d.isPairRequested() && !d.isPairRequestedByOtherEnd() && d.getConnectionSource() == BaseLink.ConnectionStarted.Remotely) { + if (!d.isPaired() && !d.isPairRequested() && !d.isPairRequestedByPeer() && d.getConnectionSource() == BaseLink.ConnectionStarted.Remotely) { d.disconnect(); } } @@ -183,7 +183,7 @@ public class BackgroundService extends Service { } else { Log.i("KDE/BackgroundService", "addLink,unknown device: " + deviceId); device = new Device(BackgroundService.this, identityPackage, link); - if (device.isPaired() || device.isPairRequested() || device.isPairRequestedByOtherEnd() + if (device.isPaired() || device.isPairRequested() || device.isPairRequestedByPeer() || link.getConnectionSource() == BaseLink.ConnectionStarted.Locally ||!discoveryModeAcquisitions.isEmpty() ) { diff --git a/src/org/kde/kdeconnect/Device.java b/src/org/kde/kdeconnect/Device.java index df788d85..44240fb9 100644 --- a/src/org/kde/kdeconnect/Device.java +++ b/src/org/kde/kdeconnect/Device.java @@ -240,10 +240,6 @@ public class Device implements BaseLink.PackageReceiver { return pairRequestedByPeer; } - public boolean isPairRequestedByOtherEnd() { - return pairStatus == PairStatus.RequestedByPeer; - } - public void addPairingCallback(PairingCallback callback) { pairingCallback.add(callback); } @@ -558,7 +554,7 @@ public class Device implements BaseLink.PackageReceiver { plugin.onPackageReceived(np); } catch (Exception e) { e.printStackTrace(); - Log.e("KDE/Device", "Exception in "+pluginKey+"'s onPackageReceived()"); + Log.e("KDE/Device", "Exception in "+plugin.getPluginKey()+"'s onPackageReceived()"); } } } else { diff --git a/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java b/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java index 0158bff0..2a2a5132 100644 --- a/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java +++ b/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java @@ -329,7 +329,7 @@ public class DeviceFragment extends Fragment { @Override public void run() { - if (device.isPairRequestedByOtherEnd()) { + if (device.isPairRequestedByPeer()) { ((TextView) rootView.findViewById(R.id.pair_message)).setText(R.string.pair_requested); rootView.findViewById(R.id.pair_progress).setVisibility(View.GONE); rootView.findViewById(R.id.pair_button).setVisibility(View.GONE);