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

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

Merge "Bluetooth: Query BluetoothPhoneService at BT ON."

parents 81a7621d 69c9ec9e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -269,6 +269,7 @@ final class HeadsetStateMachine extends StateMachine {
        addState(mAudioOn);

        setInitialState(mDisconnected);
        mPhoneState.listenForPhoneState(true);
    }

    static HeadsetStateMachine make(HeadsetService context) {
@@ -1092,6 +1093,14 @@ final class HeadsetStateMachine extends StateMachine {
        public void onServiceConnected(ComponentName className, IBinder service) {
            if (DBG) Log.d(TAG, "Proxy object connected");
            mPhoneProxy = IBluetoothHeadsetPhone.Stub.asInterface(service);
            if (mPhoneProxy != null) {
                try {
                    log("Try to query the phonestate on bind");
                    mPhoneProxy.queryPhoneState();
                } catch (RemoteException e) {
                    Log.e(TAG, Log.getStackTraceString(new Throwable()));
                }
            } else Log.e(TAG, " phone proxy null for query phone state");
        }

        public void onServiceDisconnected(ComponentName className) {