diff options
author | cdu <cdu@codeaurora.org> | 2014-10-22 14:08:15 +0800 |
---|---|---|
committer | Xiaojing Zhang <zhangx@codeaurora.org> | 2014-11-04 20:34:45 -0800 |
commit | 6069b78f1dce75b4047c2b15964d4fbe87e59c33 (patch) | |
tree | 5f462bebbc0b8348cf5f177a6e72ba86d1ba0a72 | |
parent | 23f1b86b07f8fb5893dd7cb54eb894dad1110fa2 (diff) | |
download | android_packages_apps_ContactsCommon-6069b78f1dce75b4047c2b15964d4fbe87e59c33.tar.gz android_packages_apps_ContactsCommon-6069b78f1dce75b4047c2b15964d4fbe87e59c33.tar.bz2 android_packages_apps_ContactsCommon-6069b78f1dce75b4047c2b15964d4fbe87e59c33.zip |
CSVT: Enable CSVT function.
Add support to get intent the start CSVT.
Change-Id: I3ca47230421125d128257137d06d89395c56ba2c
-rw-r--r-- | src/com/android/contacts/common/CallUtil.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/android/contacts/common/CallUtil.java b/src/com/android/contacts/common/CallUtil.java index bbfbeb5d..91f59938 100644 --- a/src/com/android/contacts/common/CallUtil.java +++ b/src/com/android/contacts/common/CallUtil.java @@ -19,6 +19,7 @@ package com.android.contacts.common; 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; @@ -92,6 +93,27 @@ public class CallUtil { } /** + * get intent to start csvt. + */ + public static Intent getCSVTCallIntent(String number) { + Intent intent = new Intent("com.borqs.videocall.action.LaunchVideoCallScreen"); + intent.addCategory(Intent.CATEGORY_DEFAULT); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); + intent.putExtra("IsCallOrAnswer", true); + intent.putExtra("LaunchMode", 1); + intent.putExtra("call_number_key", number); + return intent; + } + + /** + * if true, csvt is enabled. + */ + public static boolean isCSVTEnabled() { + boolean CSVTSupported = SystemProperties.getBoolean("persist.radio.csvt.enabled", false); + return CSVTSupported; + } + + /** * A variant of {@link #getCallIntent(String, String)} for starting a video call. */ public static Intent getVideoCallIntent(String number, String callOrigin) { |