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

Commit 667a965f authored by Martin Brabham's avatar Martin Brabham Committed by android-build-merger
Browse files

Merge "Add capability to disable CLCC polling" am: 6a8ef37a

am: 5feb956e

Change-Id: Ie4553717f70419f461b8a58837219486f321eba4
parents 88e0d1a1 5feb956e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -100,4 +100,7 @@
          - BluetoothDevice.ACTION_CONNECTION_ACCESS_CANCEL to cancel access requests -->
    <string name="pairing_ui_package">com.android.settings</string>

    <!-- Flag whether or not to keep polling AG with CLCC for call information every 2 seconds -->
    <bool name="hfp_clcc_poll_during_call">true</bool>

</resources>
+9 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ import android.os.SystemClock;
import android.support.annotation.VisibleForTesting;
import android.util.Log;
import android.util.Pair;
import com.android.bluetooth.R;

import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.AdapterService;
@@ -389,7 +390,14 @@ public class HeadsetClientStateMachine extends StateMachine {
        }

        if (mCalls.size() > 0) {
            if (mService.getResources().getBoolean(R.bool.hfp_clcc_poll_during_call)) {
                sendMessageDelayed(QUERY_CURRENT_CALLS, QUERY_CURRENT_CALLS_WAIT_MILLIS);
            } else {
                if (getCall(BluetoothHeadsetClientCall.CALL_STATE_INCOMING) != null) {
                    Log.d(TAG, "Still have incoming call; polling");
                    sendMessageDelayed(QUERY_CURRENT_CALLS, QUERY_CURRENT_CALLS_WAIT_MILLIS);
                }
            }
        }

        mCallsUpdate.clear();