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

Commit b59c3394 authored by Joseph Pirozzo's avatar Joseph Pirozzo
Browse files

HFP client status update

When call events happen request the updated status from the Audio
Gateway immediately rather than waiting until a preset timer has
expired.

Bug: 68884780
Test: runtest bluetooth; make and end phonecalls and verify that the
UI updates promptly.

Change-Id: I619fbc447d53fc87af55b2616f9258dde399b1e7
(cherry picked from commit 7e00a402b76c9167784fe90c6d24fc88c42f5c5b)
parent 2f7b5dfc
Loading
Loading
Loading
Loading
+4 −11
Original line number Diff line number Diff line
@@ -1224,19 +1224,12 @@ public class HeadsetClientStateMachine extends StateMachine {
                    }
                    break;
                case QUERY_CURRENT_CALLS:
                    // Whenever the timer expires we query calls if there are outstanding requests
                    // for query calls.
                    long currentElapsed = SystemClock.elapsedRealtime();
                    if (mClccTimer < currentElapsed) {
                        queryCallsStart();
                        mClccTimer = currentElapsed + QUERY_CURRENT_CALLS_WAIT_MILLIS;
                        // Request satisfied, ignore all other call query messages.
                        removeMessages(QUERY_CURRENT_CALLS);
                    } else {
                        // Replace all messages with one concrete message.
                    removeMessages(QUERY_CURRENT_CALLS);
                    if (mCalls.size() > 0) {
                        // If there are ongoing calls periodically check their status.
                        sendMessageDelayed(QUERY_CURRENT_CALLS, QUERY_CURRENT_CALLS_WAIT_MILLIS);
                    }
                    queryCallsStart();
                    break;
                case StackEvent.STACK_EVENT:
                    Intent intent = null;