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

Commit 677d7d4c authored by Tyler Gunn's avatar Tyler Gunn Committed by Brad Ebinger
Browse files

Add cleanupCalls to call tracker.

For GsmCdmaCallTracker, this calls pollCallsWhenSafe().  By polling the
calls in the RIL, the GSMCdmaCallTracker will reconcile the calls it knows
about with what the RIL reports, removing stale calls.

Test: Manual
Bug: 63317180
Merged-In: I7195783318bb798bfdbed4341596d25f2d278282
Change-Id: I7ee8609c41376bf21c428d04aab7d76151200699
parent 206459e6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -290,6 +290,14 @@ public abstract class CallTracker extends Handler {
    public abstract PhoneConstants.State getState();
    protected abstract void log(String msg);

    /**
     * Called when the call tracker should attempt to reconcile its calls against its underlying
     * phone implementation and cleanup any stale calls.
     */
    public void cleanupCalls() {
        // no base implementation
    }

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        pw.println("CallTracker:");
        pw.println(" mPendingOperations=" + mPendingOperations);
+9 −0
Original line number Diff line number Diff line
@@ -1662,4 +1662,13 @@ public class GsmCdmaCallTracker extends CallTracker {
                MAX_CONNECTIONS_PER_CALL_GSM :
                MAX_CONNECTIONS_PER_CALL_CDMA;
    }

    /**
     * Called to force the call tracker to cleanup any stale calls.  Does this by triggering
     * {@code GET_CURRENT_CALLS} on the RIL.
     */
    @Override
    public void cleanupCalls() {
        pollCallsWhenSafe();
    }
}