Set CAPABILITY_SUPPORTS_VIDEO_CALLING on PhoneAccount.
This capability is intended to indicate whether the account CAN support
video calls, where CAPABILITY_VIDEO_CALLING indicates whether ou can make
a video call at this time.
Merged-In: I38379a3a1cf1be04c6136b89b93ee95193ee7b6f
Test: Manual
Bug: 27328615
Change-Id: I38379a3a1cf1be04c6136b89b93ee95193ee7b6f
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index 3ed8356..7534701 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -40,6 +40,7 @@
import android.telephony.TelephonyManager;
import android.text.TextUtils;
+import com.android.ims.ImsManager;
import com.android.internal.telephony.IPhoneSubInfo;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneFactory;
@@ -173,6 +174,12 @@
capabilities |= PhoneAccount.CAPABILITY_VIDEO_CALLING;
}
+ boolean isVideoEnabledByPlatform =
+ ImsManager.isVtEnabledByPlatform(mPhone.getContext());
+ if (isVideoEnabledByPlatform) {
+ capabilities |= PhoneAccount.CAPABILITY_SUPPORTS_VIDEO_CALLING;
+ }
+
mIsVideoPresenceSupported = isCarrierVideoPresenceSupported();
if (mIsVideoCapable && mIsVideoPresenceSupported) {
capabilities |= PhoneAccount.CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE;