OSDN Git Service

IMS: Conference URI support.
authorOmkar Kolangade <omkark@codeaurora.org>
Mon, 22 Sep 2014 06:08:22 +0000 (11:38 +0530)
committerLinux Build Service Account <lnxbuild@localhost>
Wed, 24 Aug 2016 14:14:21 +0000 (08:14 -0600)
Add Telephony extras EXTRAS_IS_CONFERENCE_URI,
EXTRA_DIAL_CONFERENCE_URI which will require by Telecomm,
TeleService, Telephony, Framework, IMS framework etc.

IMS: Allow placeCall with complete URI

Add extra "org.codeaurora.extra.SKIP_SCHEMA_PARSING".
Application need to set the intent extra to dial with
complete uri.

IMS: Add participant support.

Add Phone Capabilities ADD_PARTICIPANT and
Telephony Property ADD_PARTICIPANT_KEY.

IMS: Allow add participant with normal IMS call

We should allow add participant with normal IMS
call to make it conference.
Send add participant through existing connection
of normal IMS call.

IMS: Add Participant support.

Do not create new connection while adding participant
with existing call. Rather send add participant request
through IMSConference.

CRs-Fixed: 1023216
Change-Id: I5052710a2d11a57331bdfbe64247e6a39bf9147a

telecomm/java/android/telecom/Call.java
telecomm/java/android/telecom/Conference.java
telecomm/java/android/telecom/Connection.java
telecomm/java/android/telecom/ConnectionService.java
telecomm/java/com/android/internal/telecom/IConnectionService.aidl
telephony/java/com/android/internal/telephony/TelephonyProperties.java

index 53f9775..6a66023 100644 (file)
@@ -262,8 +262,14 @@ public final class Call {
          */
         public static final int CAPABILITY_VOICE_PRIVACY = 0x01000000;
 
+        /**
+         * Add participant in an active or conference call option
+         * @hide
+         */
+        public static final int CAPABILITY_ADD_PARTICIPANT = 0x02000000;
+
         //******************************************************************************************
-        // Next CAPABILITY value: 0x02000000
+        // Next CAPABILITY value: 0x04000000
         //******************************************************************************************
 
         /**
@@ -422,6 +428,9 @@ public final class Call {
             if (can(capabilities, CAPABILITY_VOICE_PRIVACY)) {
                 builder.append(" CAPABILITY_VOICE_PRIVACY");
             }
+            if (can(capabilities, CAPABILITY_ADD_PARTICIPANT)) {
+                builder.append(" CAPABILITY_ADD_PARTICIPANT");
+            }
             builder.append("]");
             return builder.toString();
         }
index 0227d27..a4a06b2 100644 (file)
@@ -268,6 +268,14 @@ public abstract class Conference extends Conferenceable {
     public void onSeparate(Connection connection) {}
 
     /**
+     * Invoked when the conference adds a participant to the conference call.
+     *
+     * @param participant The participant to be added with conference call.
+     * @hide
+     */
+    public void onAddParticipant(String participant) {}
+
+    /**
      * Invoked when the specified {@link Connection} should merged with the conference call.
      *
      * @param connection The {@code Connection} to merge.
index ae0ddfa..a646d42 100644 (file)
@@ -236,6 +236,13 @@ public abstract class Connection extends Conferenceable {
     public static final int CAPABILITY_CAN_PAUSE_VIDEO = 0x00100000;
 
     /**
+     * Add participant in an active or conference call option
+     *
+     * @hide
+     */
+    public static final int CAPABILITY_ADD_PARTICIPANT = 0x02000000;
+
+    /**
      * For a conference, indicates the conference will not have child connections.
      * <p>
      * An example of a conference with child connections is a GSM conference call, where the radio
index fc7d741..053124b 100644 (file)
@@ -106,6 +106,8 @@ public abstract class ConnectionService extends Service {
     private static final int MSG_PULL_EXTERNAL_CALL = 22;
     private static final int MSG_SEND_CALL_EVENT = 23;
     private static final int MSG_ON_EXTRAS_CHANGED = 24;
+    //Proprietary values starts after this.
+    private static final int MSG_ADD_PARTICIPANT_WITH_CONFERENCE = 30;
 
     private static Connection sNullConnection;
 
@@ -232,6 +234,14 @@ public abstract class ConnectionService extends Service {
         }
 
         @Override
+        public void addParticipantWithConference(String callId, String participant) {
+            SomeArgs args = SomeArgs.obtain();
+            args.arg1 = callId;
+            args.arg2 = participant;
+            mHandler.obtainMessage(MSG_ADD_PARTICIPANT_WITH_CONFERENCE, args).sendToTarget();
+        }
+
+        @Override
         public void mergeConference(String callId) {
             mHandler.obtainMessage(MSG_MERGE_CONFERENCE, callId).sendToTarget();
         }
@@ -390,6 +400,17 @@ public abstract class ConnectionService extends Service {
                 case MSG_SPLIT_FROM_CONFERENCE:
                     splitFromConference((String) msg.obj);
                     break;
+                case MSG_ADD_PARTICIPANT_WITH_CONFERENCE: {
+                    SomeArgs args = (SomeArgs) msg.obj;
+                    try {
+                        String callId = (String) args.arg1;
+                        String participant = (String) args.arg2;
+                        addParticipantWithConference(callId, participant);
+                    } finally {
+                        args.recycle();
+                    }
+                    break;
+                }
                 case MSG_MERGE_CONFERENCE:
                     mergeConference((String) msg.obj);
                     break;
@@ -940,6 +961,17 @@ public abstract class ConnectionService extends Service {
         }
     }
 
+    private void addParticipantWithConference(String callId, String participant) {
+        Log.d(this, "ConnectionService addParticipantWithConference(%s, %s)", participant, callId);
+        Conference conference = findConferenceForAction(callId, "addParticipantWithConference");
+        Connection connection = findConnectionForAction(callId, "addParticipantWithConnection");
+        if (connection != getNullConnection()) {
+            onAddParticipant(connection, participant);
+        } else if (conference != getNullConference()) {
+            conference.onAddParticipant(participant);
+        }
+    }
+
     private void mergeConference(String callId) {
         Log.d(this, "mergeConference(%s)", callId);
         Conference conference = findConferenceForAction(callId, "mergeConference");
@@ -1293,6 +1325,19 @@ public abstract class ConnectionService extends Service {
     public void onConference(Connection connection1, Connection connection2) {}
 
     /**
+     * Add participant with connection. Invoked when user has made a request to add
+     * participant with specified connection. In response, the participant should add with
+     * the connection.
+     *
+     * @param connection A connection where participant need to add.
+     * @param participant Address of participant which will be added.
+     * @return
+     *
+     * @hide
+     */
+    public void onAddParticipant(Connection connection, String participant) {}
+
+    /**
      * Indicates that a remote conference has been created for existing {@link RemoteConnection}s.
      * When this method is invoked, this {@link ConnectionService} should create its own
      * representation of the conference call and send it to telecom using {@link #addConference}.
index a4c1798..e85dfb9 100644 (file)
@@ -81,4 +81,6 @@ oneway interface IConnectionService {
     void sendCallEvent(String callId, String event, in Bundle extras);
 
     void onExtrasChanged(String callId, in Bundle extras);
+
+    void addParticipantWithConference(String callId, String recipients);
 }
index 6567ea7..1d142e7 100644 (file)
@@ -218,4 +218,34 @@ public interface TelephonyProperties
      */
     static final String PROPERTY_VIDEOCALL_AUDIO_OUTPUT = "persist.radio.call.audio.output";
 
+    /**
+     * Used when Presence app sends Dial intent with specific schema
+     * If true: skip schema parsing and use Tel schema
+     * If false: parse schema
+     */
+    static final String EXTRA_SKIP_SCHEMA_PARSING =
+            "org.codeaurora.extra.SKIP_SCHEMA_PARSING";
+
+    /**
+     * For Group Conference Calling
+     * If true: isConferenceUri in Dial is set to true,
+     *          which indicates that Dial is for Conference Calling
+     * If false: above is set to false
+     */
+    static final String EXTRAS_IS_CONFERENCE_URI = "isConferenceUri";
+
+    /**
+     * For Group Conference Dialing Feature
+     * If true: Dial intent triggered from Group Conference Calling screen
+     * if false: normal dial
+     */
+    static final String EXTRA_DIAL_CONFERENCE_URI =
+            "org.codeaurora.extra.DIAL_CONFERENCE_URI";
+
+    /**
+     * For Add Participant Feature
+     * If true: Dial intent triggered from Dialpad is for AddParticipant
+     * if false: normal dial
+     */
+    static final String ADD_PARTICIPANT_KEY = "add_participant";
 }