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

Commit d64a2906 authored by Ashwini Munigala's avatar Ashwini Munigala Committed by Nitin Shivpure
Browse files

OPP: Handle intent receiver leak for BT TURN OFF.

Mark INBOUND and OUTBOUND active transfer as cancelled
on BT TURN OFF.

Change-Id: I52e6d59ba56e004af2dc25b85975dfeb6c19320a
parent 70aeddac
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -219,8 +219,20 @@ public class BluetoothOppService extends Service {
        public void handleMessage(Message msg) {
            switch (msg.what) {
                case STOP_LISTENER:
                    if(mSocketListener != null){
                        mSocketListener.stop();
                    }
                    mListenStarted = false;
                    //Stop Active INBOUND Transfer
                    if(mServerTransfer != null){
                       mServerTransfer.onBatchCanceled();
                       mServerTransfer =null;
                    }
                    //Stop Active OUTBOUND Transfer
                    if(mTransfer != null){
                       mTransfer.onBatchCanceled();
                       mTransfer =null;
                    }
                    synchronized (BluetoothOppService.this) {
                        if (mUpdateThread == null) {
                            stopSelf();