summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/contacts/common')
-rw-r--r--src/com/android/contacts/common/CallUtil.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/com/android/contacts/common/CallUtil.java b/src/com/android/contacts/common/CallUtil.java
index 7585ad4a..f11ea047 100644
--- a/src/com/android/contacts/common/CallUtil.java
+++ b/src/com/android/contacts/common/CallUtil.java
@@ -22,11 +22,13 @@ import com.android.phone.common.PhoneConstants;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
+import android.os.SystemProperties;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
import android.telecom.VideoProfile;
import android.text.TextUtils;
+import android.telephony.TelephonyManager;
import java.util.List;
@@ -186,4 +188,37 @@ public class CallUtil {
}
return false;
}
+
+ /**
+ * if true, conference dialer is enabled.
+ */
+ public static boolean isConferDialerEnabled(Context context) {
+ if (SystemProperties.getBoolean("persist.radio.conferdialer", false)) {
+ TelephonyManager telephonyMgr = (TelephonyManager)
+ context.getSystemService(Context.TELEPHONY_SERVICE);
+ return telephonyMgr.isImsRegistered();
+ }
+ return false;
+ }
+
+ /**
+ * get intent to start conference dialer
+ * with this intent, we can originate an conference call
+ */
+ public static Intent getConferenceDialerIntent(String number) {
+ Intent intent = new Intent("android.intent.action.ADDPARTICIPANT");
+ intent.putExtra("confernece_number_key", number);
+ return intent;
+ }
+
+ /**
+ * used to get intent to start conference dialer
+ * with this intent, we can add participants to an existing conference call
+ */
+ public static Intent getAddParticipantsIntent(String number) {
+ Intent intent = new Intent("android.intent.action.ADDPARTICIPANT");
+ intent.putExtra("add_participant", true);
+ intent.putExtra("current_participant_list", number);
+ return intent;
+ }
}