Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6354c9e authored by Sai Aitharaju's avatar Sai Aitharaju
Browse files

Bluetooth App: Fixed the HDP disconnection notification failure

When a HDP connection is disconnected, HDP disconnection
notification isn't sent to Application as the Health
ChannelCallback was skipped. Fixed the issue by placing
the NULL check at the appropriate position.

CRs-Fixed: 785322
Change-Id: Ib1bc5c7677c1583b7fe582fe27f157880e764ad9
parent a3edd20e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -266,9 +266,10 @@ public class HealthService extends ProfileService {
                    HealthChannel chan = findChannelById(channelStateEvent.mChannelId);
                    BluetoothHealthAppConfiguration appConfig =
                            findAppConfigByAppId(channelStateEvent.mAppId);
                    if (appConfig == null) break;
                    int newState;
                    newState = convertHalChannelState(channelStateEvent.mState);
                    if (newState  ==  BluetoothHealth.STATE_CHANNEL_DISCONNECTED ||
                    if (newState  ==  BluetoothHealth.STATE_CHANNEL_DISCONNECTED &&
                        appConfig == null) {
                        Log.e(TAG,"Disconnected for non existing app");
                        break;