2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 13:17:43 +00:00

Be less verbose

This commit is contained in:
Albert Vaca 2016-06-02 13:25:55 +02:00
parent a26d6a94f9
commit 01b5c3e2a1
2 changed files with 5 additions and 7 deletions

View File

@ -111,7 +111,7 @@ public class LanPairingHandler extends BasePairingHandler {
mPairingTimer.schedule(new TimerTask() { mPairingTimer.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
Log.e("KDE/Device","Unpairing (timeout B)"); Log.w("KDE/Device","Unpairing (timeout B)");
mPairStatus = PairStatus.NotPaired; mPairStatus = PairStatus.NotPaired;
hidePairingNotification(); hidePairingNotification();
} }
@ -148,7 +148,7 @@ public class LanPairingHandler extends BasePairingHandler {
@Override @Override
public void run() { public void run() {
mCallback.pairingFailed(mDevice.getContext().getString(R.string.error_timed_out)); mCallback.pairingFailed(mDevice.getContext().getString(R.string.error_timed_out));
Log.e("KDE/Device","Unpairing (timeout A)"); Log.w("KDE/Device","Unpairing (timeout A)");
mPairStatus = PairStatus.NotPaired; mPairStatus = PairStatus.NotPaired;
} }
}, 30*1000); //Time to wait for the other to accept }, 30*1000); //Time to wait for the other to accept
@ -160,7 +160,6 @@ public class LanPairingHandler extends BasePairingHandler {
mCallback.pairingFailed(mDevice.getContext().getString(R.string.error_could_not_send_package)); mCallback.pairingFailed(mDevice.getContext().getString(R.string.error_could_not_send_package));
} }
}; };
//createPublicKeyPackage() ?
mDevice.sendPackage(createPairPackage(), statusCallback); mDevice.sendPackage(createPairPackage(), statusCallback);
} }
@ -200,7 +199,7 @@ public class LanPairingHandler extends BasePairingHandler {
@Override @Override
public void pairingDone() { public void pairingDone() {
// Store device information needed to create a Device object in a future // Store device information needed to create a Device object in a future
Log.e("KDE/PairingDone", "Pairing Done"); //Log.e("KDE/PairingDone", "Pairing Done");
SharedPreferences.Editor editor = mDevice.getContext().getSharedPreferences(mDevice.getDeviceId(), Context.MODE_PRIVATE).edit(); SharedPreferences.Editor editor = mDevice.getContext().getSharedPreferences(mDevice.getDeviceId(), Context.MODE_PRIVATE).edit();
try { try {
@ -214,12 +213,12 @@ public class LanPairingHandler extends BasePairingHandler {
String encodedCertificate = Base64.encodeToString(mDevice.certificate.getEncoded(), 0); String encodedCertificate = Base64.encodeToString(mDevice.certificate.getEncoded(), 0);
editor.putString("certificate", encodedCertificate); editor.putString("certificate", encodedCertificate);
} catch (NullPointerException n) { } catch (NullPointerException n) {
Log.e("KDE/PairingDone", "Certificate is null, remote device does not support ssl"); Log.w("KDE/PairingDone", "Certificate is null, remote device does not support ssl");
} catch (CertificateEncodingException c) { } catch (CertificateEncodingException c) {
Log.e("KDE/PairingDOne", "Error encoding certificate"); Log.e("KDE/PairingDOne", "Error encoding certificate");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
Log.e("KDE/Pairng", "Some exception while encoding string"); Log.e("KDE/Pairng", "Exception");
} }
editor.apply(); editor.apply();

View File

@ -77,7 +77,6 @@ public class RunCommandActivity extends ActionBarActivity {
@Override @Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
try { try {
Log.e("fu", commands.get(i).getString("command"));
plugin.runCommand(commands.get(i).getString("key")); plugin.runCommand(commands.get(i).getString("key"));
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();