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

Commit 54dd28fa authored by Suresh Koleti's avatar Suresh Koleti Committed by Ravi Paluri
Browse files

IMS: Fix for add participant issue

With l-mr1, callsManager runs in system server process and
callActivity runs in ui process because of which callActivity
cannot access callsManager instance.

Fix this by handling ADD_PARTICIPANT extras in callsManager.

Conflicts:
	src/com/android/server/telecom/CallActivity.java

Change-Id: I3095736b6307fa76646b0a69116557f6337d9bae
parent c7603376
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -90,26 +90,7 @@ public class CallActivity extends Activity {
        if (Intent.ACTION_CALL.equals(action) ||
                Intent.ACTION_CALL_PRIVILEGED.equals(action) ||
                Intent.ACTION_CALL_EMERGENCY.equals(action)) {
        boolean isAddParticipant = intent.getBooleanExtra(
                TelephonyProperties.ADD_PARTICIPANT_KEY, false);
        Log.d(this, "isAddparticipant = "+isAddParticipant);
        if (isAddParticipant) {
            String number = PhoneNumberUtils.getNumberFromIntent(intent, this);
            boolean isConferenceUri = intent.getBooleanExtra(
                    TelephonyProperties.EXTRA_DIAL_CONFERENCE_URI, false);
            if (!isConferenceUri) {
                number = PhoneNumberUtils.stripSeparators(number);
            }
            CallsManager callsManager = CallsManager.getInstance();
            if (callsManager != null) {
                callsManager.addParticipant(number);
                callsManager.getInCallController().bringToForeground(false);
            } else {
                Log.w(this, "CallsManager is null, can't process add Participant");
            }
        } else {
            processOutgoingCallIntent(intent);
        }
        } else if (TelecomManager.ACTION_INCOMING_CALL.equals(action)) {
            processIncomingCallIntent(intent);
        }
+9 −0
Original line number Diff line number Diff line
@@ -464,6 +464,15 @@ public final class CallsManager extends Call.ListenerBase {
     * @param extras The optional extras Bundle passed with the intent used for the incoming call.
     */
    Call startOutgoingCall(Uri handle, PhoneAccountHandle phoneAccountHandle, Bundle extras) {

        boolean isAddParticipant = ((extras != null) && (extras.getBoolean(
                TelephonyProperties.ADD_PARTICIPANT_KEY, false)));
        if (isAddParticipant) {
            addParticipant(handle.toString());
            mInCallController.bringToForeground(false);
            return null;
        }

        // Create a call with original handle. The handle may be changed when the call is attached
        // to a connection service, but in most cases will remain the same.
        Call call = new Call(