2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 05:37:43 +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() {
mDevice.hidePairingNotification();
if (pairingTimer != null) {
pairingTimer.cancel();
if (mPairingTimer != null) {
mPairingTimer .cancel();
}
}

View File

@ -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() )
{

View File

@ -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 {

View File

@ -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);