Merge "Set CAPABILITY_SUPPORTS_VIDEO_CALLING on PhoneAccount."
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index 02215d5..acf668b 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -44,6 +44,7 @@
import android.telephony.TelephonyManager;
import android.text.TextUtils;
+import com.android.ims.ImsManager;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneFactory;
import com.android.phone.PhoneGlobals;
@@ -181,16 +182,23 @@
}
mIsVideoCapable = mPhone.isVideoEnabled();
+ boolean isVideoEnabledByPlatform =
+ ImsManager.isVtEnabledByPlatform(mPhone.getContext());
if (!mIsPrimaryUser) {
Log.i(this, "Disabling video calling for secondary user.");
mIsVideoCapable = false;
+ isVideoEnabledByPlatform = false;
}
if (mIsVideoCapable) {
capabilities |= PhoneAccount.CAPABILITY_VIDEO_CALLING;
}
+ if (isVideoEnabledByPlatform) {
+ capabilities |= PhoneAccount.CAPABILITY_SUPPORTS_VIDEO_CALLING;
+ }
+
mIsVideoPresenceSupported = isCarrierVideoPresenceSupported();
if (mIsVideoCapable && mIsVideoPresenceSupported) {
capabilities |= PhoneAccount.CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE;