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

Commit 6a8ef37a authored by Martin Brabham's avatar Martin Brabham Committed by Gerrit Code Review
Browse files

Merge "Add capability to disable CLCC polling"

parents 1d557b64 01e83913
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();