OSDN Git Service

HealthService: Fix not adding channel to channel list
authorSzymon Janc <szymon.janc@tieto.com>
Fri, 4 Jul 2014 12:24:10 +0000 (14:24 +0200)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 5 May 2016 09:57:49 +0000 (17:57 +0800)
Channel is not added to channel list on success of connect channel
request. Upon connection status (connecting) callback it searches
for channel id but id does not exists and treating it as incoming
connection.

Change-Id: Id1b2bcbbf9b5eaf958d391055dd0ffeaf9aa0a64

src/com/android/bluetooth/hdp/HealthService.java

index 8d8eff7..0b6270e 100644 (file)
@@ -212,6 +212,8 @@ public class HealthService extends ProfileService {
                                                   BluetoothHealth.STATE_CHANNEL_DISCONNECTED,
                                                   BluetoothHealth.STATE_CHANNEL_DISCONNECTING,
                                                   chan.mChannelFd, chan.mChannelId);
+                    } else {
+                        mHealthChannels.add(chan);
                     }
                 }
                     break;