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

Commit 238d24fb authored by Andre Eisenbach's avatar Andre Eisenbach Committed by Android Git Automerger
Browse files

am f6b62a9d: am cd460538: Merge "Don\'t send the onServiceDisconnected...

am f6b62a9d: am cd460538: Merge "Don\'t send the onServiceDisconnected callback after close." into lmp-mr1-dev

* commit 'f6b62a9d913441cb400fc60f3187fc9c1f28dc97':
  Don't send the onServiceDisconnected callback after close.
parents 7475bfad 733656c6
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -229,7 +229,6 @@ public final class BluetoothHeadset implements BluetoothProfile {
    private ServiceListener mServiceListener;
    private IBluetoothHeadset mService;
    private BluetoothAdapter mAdapter;
    private boolean mIsClosed;

    final private IBluetoothStateChangeCallback mBluetoothStateChangeCallback =
            new IBluetoothStateChangeCallback.Stub() {
@@ -260,7 +259,6 @@ public final class BluetoothHeadset implements BluetoothProfile {
        mContext = context;
        mServiceListener = l;
        mAdapter = BluetoothAdapter.getDefaultAdapter();
        mIsClosed = false;

        IBluetoothManager mgr = mAdapter.getBluetoothManager();
        if (mgr != null) {
@@ -314,7 +312,7 @@ public final class BluetoothHeadset implements BluetoothProfile {
                Log.e(TAG,"",e);
            }
        }
        mIsClosed = true;
        mServiceListener = null;
        doUnbind();
    }

@@ -983,9 +981,6 @@ public final class BluetoothHeadset implements BluetoothProfile {
                    if (mServiceListener != null) {
                        mServiceListener.onServiceDisconnected(BluetoothProfile.HEADSET);
                    }
                    if (mIsClosed){
                        mServiceListener = null;
                    }
                    break;
                }
            }