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

Commit 7a345d66 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Bluetooth: Fix to avoid object leaks during BT OFF"

parents 39ee96b7 5ce039c6
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -402,13 +402,21 @@ public class BluetoothTetheringDataTracker extends BaseNetworkStateTracker {
                        } else {
                            ac.sendMessage(
                                    AsyncChannel.CMD_CHANNEL_FULL_CONNECTION);
                            mStackChannel = ac;
                            if (VDBG) Log.d(TAG, "CMD_CHANNEL_HALF_CONNECTED: " + mStackChannel);
                        }
                    }
                    break;
                case AsyncChannel.CMD_CHANNEL_DISCONNECTED:
                    if (VDBG) Log.d(TAG, "got CMD_CHANNEL_DISCONNECTED");
                    if (mStackChannel != null) {
                        mBtdt.stopReverseTether();
                        mBtdt.mAsyncChannel.set(null);

                        Log.d(TAG, "Disconnect CMD_CHANNEL_HALF_CONNECTED: " + mStackChannel);
                        mStackChannel.disconnect();
                        mStackChannel = null;
                    }
                    break;
                case NetworkStateTracker.EVENT_NETWORK_CONNECTED:
                    LinkProperties linkProperties = (LinkProperties)(msg.obj);