altosdroid: Let a freshly connected client know what the device name is!
authorMike Beattie <mike@ethernal.org>
Mon, 27 Aug 2012 07:41:47 +0000 (19:41 +1200)
committerMike Beattie <mike@ethernal.org>
Mon, 27 Aug 2012 07:41:47 +0000 (19:41 +1200)
Signed-off-by: Mike Beattie <mike@ethernal.org>
altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java

index ecafc74a0fd6b13c0898dac920e790047f0dd8c9..88ba805cd44fbb1fb2f5ca65c285e847eb014a36 100644 (file)
@@ -82,6 +82,7 @@ public class TelemetryService extends Service {
                        case MSG_REGISTER_CLIENT:
                                s.mClients.add(msg.replyTo);
                                try {
+                                       msg.replyTo.send(Message.obtain(null, AltosDroid.MSG_DEVNAME, s.device.getName()));
                                        msg.replyTo.send(Message.obtain(null, AltosDroid.MSG_STATE_CHANGE, s.state, -1));
                                } catch (RemoteException e) {
                                        s.mClients.remove(msg.replyTo);