2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 13:47:41 +00:00

Fixing build

This commit is contained in:
Albert Vaca
2016-01-10 03:16:14 -08:00
parent 3e9509123e
commit 1ca09d7f58
4 changed files with 6 additions and 10 deletions

View File

@@ -181,8 +181,8 @@ public class LanPairingHandler extends BasePairingHandler {
public void hidePairingNotification() { public void hidePairingNotification() {
mDevice.hidePairingNotification(); mDevice.hidePairingNotification();
if (pairingTimer != null) { if (mPairingTimer != null) {
pairingTimer.cancel(); mPairingTimer .cancel();
} }
} }

View File

@@ -163,7 +163,7 @@ public class BackgroundService extends Service {
private void cleanDevices() { private void cleanDevices() {
for(Device d : devices.values()) { 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(); d.disconnect();
} }
} }
@@ -183,7 +183,7 @@ public class BackgroundService extends Service {
} else { } else {
Log.i("KDE/BackgroundService", "addLink,unknown device: " + deviceId); Log.i("KDE/BackgroundService", "addLink,unknown device: " + deviceId);
device = new Device(BackgroundService.this, identityPackage, link); 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 || link.getConnectionSource() == BaseLink.ConnectionStarted.Locally
||!discoveryModeAcquisitions.isEmpty() ) ||!discoveryModeAcquisitions.isEmpty() )
{ {

View File

@@ -240,10 +240,6 @@ public class Device implements BaseLink.PackageReceiver {
return pairRequestedByPeer; return pairRequestedByPeer;
} }
public boolean isPairRequestedByOtherEnd() {
return pairStatus == PairStatus.RequestedByPeer;
}
public void addPairingCallback(PairingCallback callback) { public void addPairingCallback(PairingCallback callback) {
pairingCallback.add(callback); pairingCallback.add(callback);
} }
@@ -558,7 +554,7 @@ public class Device implements BaseLink.PackageReceiver {
plugin.onPackageReceived(np); plugin.onPackageReceived(np);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
Log.e("KDE/Device", "Exception in "+pluginKey+"'s onPackageReceived()"); Log.e("KDE/Device", "Exception in "+plugin.getPluginKey()+"'s onPackageReceived()");
} }
} }
} else { } else {

View File

@@ -329,7 +329,7 @@ public class DeviceFragment extends Fragment {
@Override @Override
public void run() { public void run() {
if (device.isPairRequestedByOtherEnd()) { if (device.isPairRequestedByPeer()) {
((TextView) rootView.findViewById(R.id.pair_message)).setText(R.string.pair_requested); ((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_progress).setVisibility(View.GONE);
rootView.findViewById(R.id.pair_button).setVisibility(View.GONE); rootView.findViewById(R.id.pair_button).setVisibility(View.GONE);