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

Commit 1aa7cf1d authored by Grant Menke's avatar Grant Menke Committed by Android (Google) Code Review
Browse files

Merge "Ignore requests to remove a call when there are pending connection attempts." into main

parents cfd7173f bd80a45d
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2540,6 +2540,17 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        }
    }

    boolean completedProcessingAllAttempts() {
        if (mCreateConnectionProcessor != null) {
            return (!mCreateConnectionProcessor.isCallTimedOut() &&
                    mCreateConnectionProcessor.isProcessingComplete());
        } else {
            // If mCreateConnectionProcessor is null then there are no attempts to process:
            return true;
        }

    }

    /**
     * Starts the create connection sequence. Upon completion, there should exist an active
     * connection through a connection service (or the call will have failed).
+11 −1
Original line number Diff line number Diff line
@@ -385,7 +385,15 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
                            mCallsManager.markCallAsDisconnected(
                                    call, new DisconnectCause(DisconnectCause.REMOTE));
                        }
                        if (!mFlags.updatedRcsCallCountTracking()){
                            mCallsManager.markCallAsRemoved(call);
                        } else if (call.completedProcessingAllAttempts()
                                || !call.isEmergencyCall()) {
                            mCallsManager.markCallAsRemoved(call);
                        } else {
                            Log.i(this, "removeCall: emergency call has not "
                                    + "completed processing all attempts so skipping removal");
                        }
                    }
                }
            } catch (Throwable t) {
@@ -1349,6 +1357,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
    private final CallsManager mCallsManager;
    private final AppOpsManager mAppOpsManager;
    private final Context mContext;
    private final FeatureFlags mFlags;

    private ConnectionServiceFocusManager.ConnectionServiceFocusListener mConnSvrFocusListener;

@@ -1383,6 +1392,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        mCallsManager = callsManager;
        mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
        mContext = context;
        mFlags = featureFlags;
    }

    /** See {@link IConnectionService#addConnectionServiceAdapter}. */