IMS: Conference URI support.
Retrieve extra DIAL_CONFERENCE_URI
from dial intent and propagate it
to TeleService.
IMS: Allow placeCall with complete uri
Add code to dial with complete uri if dial intent contains
extra "org.codeaurora.extra.SKIP_SCHEMA_PARSING" set to true.
IMS: Allow ims call with uri address on telephone connection
If ims call is initiated with sip scheme, sip phone account
is selected wrongly instead of telephone account.
Force telephone account when call is initiated with
conference uri or skip schema parsing extras.
IMS: Allow dial Conference call without URI List
Remove empty string check to place Conference call
without URI List
IMS: Add participant support
Implement addParticipant() API and
propagate ADD_PARTICIPANT_KEY extra
to TeleService
IMS: Add Participant support
Do not create new connection while add participant
with existing call. Rather send add participant request
through IMSConference call
IMS: Fix add participent and upgrade/downgrade button visibility
Fix add participent and upgrade/downgrade button visibility.
IMS: Fix two addParticipant requests send to RIL
Do not treat addParticipant as emergency call case,
rather consider it as non-emergency call and broadcast
the Intent
Clean up unnecessary codes and let to call addParticipant()
from TeleService after create connection.
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.
IMS: Get the scheme-specific part from the URI
Get the scheme-specific part from URI to get the actual dialed number
by user in add participant use case
IMS: Add Participant number formatting
Apply strip separator on recipient address
if it's not dialed using Conference URI
dialer and skip schema parsing is false.
Conflicts:
src/com/android/server/telecom/components/UserCallIntentProcessor.java
Change-Id: I50b6e3e427ba8940e05347c72e541123d029ac47
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index 0de43e4..e4531b7 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -616,8 +616,30 @@
VideoProfile.STATE_AUDIO_ONLY));
}
+ boolean isAddParticipant = ((extras != null) && (extras.getBoolean(
+ TelephonyProperties.ADD_PARTICIPANT_KEY, false)));
+ boolean isSkipSchemaOrConfUri = ((extras != null) && (extras.getBoolean(
+ TelephonyProperties.EXTRA_SKIP_SCHEMA_PARSING, false) ||
+ extras.getBoolean(TelephonyProperties.EXTRA_DIAL_CONFERENCE_URI, false)));
+
+ if (isAddParticipant) {
+ String number = handle.getSchemeSpecificPart();
+ if (!isSkipSchemaOrConfUri) {
+ number = PhoneNumberUtils.stripSeparators(number);
+ }
+ addParticipant(number);
+ mInCallController.bringToForeground(false);
+ return null;
+ }
+
+ // Force tel scheme for ims conf uri/skip schema calls to avoid selection of sip accounts
+ String scheme = (isSkipSchemaOrConfUri? PhoneAccount.SCHEME_TEL: handle.getScheme());
+
+ Log.d(this, "startOutgoingCall :: isAddParticipant=" + isAddParticipant
+ + " isSkipSchemaOrConfUri=" + isSkipSchemaOrConfUri + " scheme=" + scheme);
+
List<PhoneAccountHandle> accounts =
- mPhoneAccountRegistrar.getCallCapablePhoneAccounts(handle.getScheme(), false);
+ mPhoneAccountRegistrar.getCallCapablePhoneAccounts(scheme, false);
Log.v(this, "startOutgoingCall found accounts = " + accounts);
@@ -650,7 +672,7 @@
// No preset account, check if default exists that supports the URI scheme for the
// handle.
phoneAccountHandle =
- mPhoneAccountRegistrar.getOutgoingPhoneAccountForScheme(handle.getScheme());
+ mPhoneAccountRegistrar.getOutgoingPhoneAccountForScheme(scheme);
}
call.setTargetPhoneAccount(phoneAccountHandle);
@@ -753,6 +775,23 @@
}
/**
+ * Attempts to add participant in a call.
+ *
+ * @param number number to connect the call with.
+ */
+ private void addParticipant(String number) {
+ Log.i(this, "addParticipant number ="+number);
+ if (getForegroundCall() == null) {
+ // don't do anything if the call no longer exists
+ Log.i(this, "Canceling unknown call.");
+ return;
+ } else {
+ getForegroundCall().addParticipantWithConference(number);
+ }
+ }
+
+
+ /**
* Attempts to start a conference call for the specified call.
*
* @param call The call to conference.