From e4b6fc3238ad9911fd40ef25accf82a401cb190f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 13 Apr 2013 11:39:14 -0700 Subject: altosdroid: Show our position in the map tab. Squeeze to fit phones Shrink everything to fit on phones, then add phone location to the map tab Signed-off-by: Keith Packard --- altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java') diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java index 0ddfdfc3..f1304a95 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java @@ -245,6 +245,9 @@ public class TelemetryService extends Service { } private void startAltosBluetooth() { + if (device == null) { + return; + } if (mAltosBluetooth == null) { if (D) Log.d(TAG, String.format("startAltosBluetooth(): Connecting to %s (%s)", device.getName(), device.getAddress())); mAltosBluetooth = new AltosBluetooth(device, mHandler); @@ -274,6 +277,8 @@ public class TelemetryService extends Service { private void connected() { try { + if (mAltosBluetooth == null) + throw new InterruptedException("no bluetooth"); mConfigData = mAltosBluetooth.config_data(); } catch (InterruptedException e) { } catch (TimeoutException e) { -- cgit v1.2.3