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

Commit 527f7d11 authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

DSDA - Resolve failing CTS with flag enabled

Resolve the failing CTS tests that appeared from moving the flag into
staging.

Bug: 393202837
Test: atest SelfManagedConnectionServiceTest
Flag: com.android.server.telecom.flags.enable_call_sequencing
Change-Id: Ia4d5d681437030d26bdfbc77982390fae0d090ea
parent 1ac2e832
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -3216,7 +3216,18 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
            } else if (mConnectionService != null) {
                if (mFlags.transactionalCsVerifier() || mFlags.enableCallSequencing()) {
                    holdFutureHandler = awaitCallStateChangeAndMaybeDisconnectCall(isSelfManaged(),
                            "hold", CallState.ON_HOLD);
                            "hold", CallState.ON_HOLD, CallState.DISCONNECTED).thenCompose(
                                    (result) -> {
                                        // Explicitly handle self-managed hold failures where we
                                        // explicitly disconnect the call and treat it as a
                                        // completed transaction.
                                        if (!result && isSelfManaged()) {
                                            Log.i(this, "hold: Completing transaction "
                                                    + "after disconnecting held call.");
                                            return CompletableFuture.completedFuture(true);
                                        }
                                        return CompletableFuture.completedFuture(result);
                                    });;
                }
                mConnectionService.hold(this);
                return holdFutureHandler;