From: Mike Beattie Date: Tue, 28 Aug 2012 09:59:15 +0000 (+1200) Subject: altosdroid: more logical name for connection_lost() method. X-Git-Tag: 1.1~47^2~10 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=9d0f187f06c411f0d82e13ee4f2faea789ed9e79 altosdroid: more logical name for connection_lost() method. Signed-off-by: Mike Beattie --- diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java index dffa9ffb..0076fc53 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosBluetooth.java @@ -143,7 +143,7 @@ public class AltosBluetooth extends AltosLink { } } - private void connection_failed() { + private void connection_lost() { if (D) Log.e(TAG, "Connection lost during I/O"); handler.obtainMessage(TelemetryService.MSG_DISCONNECTED).sendToTarget(); } @@ -156,9 +156,9 @@ public class AltosBluetooth extends AltosLink { output.write(bytes); if (D) Log.d(TAG, "print(): Wrote bytes: '" + data.replace('\n', '\\') + "'"); } catch (IOException e) { - connection_failed(); + connection_lost(); } catch (InterruptedException e) { - connection_failed(); + connection_lost(); } } @@ -167,9 +167,9 @@ public class AltosBluetooth extends AltosLink { wait_connected(); return input.read(); } catch (IOException e) { - connection_failed(); + connection_lost(); } catch (java.lang.InterruptedException e) { - connection_failed(); + connection_lost(); } return AltosLink.ERROR; }