Turn on VT when turning on Enhanced 4G LTE and VT is enabled in settings
Pavel Zhamaitsiak [Fri, 15 Apr 2016 19:16:57 +0000 (12:16 -0700)]
Bug: 27974555
Change-Id: I6899f46e9a6d0dd5160882cdeda92ab202f8ea3a

src/java/com/android/ims/ImsManager.java

index 000f990..99c35f8 100644 (file)
@@ -1193,6 +1193,14 @@ public class ImsManager {
             if (config != null && (turnOn || !isImsTurnOffAllowed())) {
                 config.setFeatureValue(ImsConfig.FeatureConstants.FEATURE_TYPE_VOICE_OVER_LTE,
                         TelephonyManager.NETWORK_TYPE_LTE, turnOn ? 1 : 0, mImsConfigListener);
+
+                if (isVtEnabledByPlatform(mContext)) {
+                    boolean enableViLte = turnOn && isVtEnabledByUser(mContext);
+                    config.setFeatureValue(ImsConfig.FeatureConstants.FEATURE_TYPE_VIDEO_OVER_LTE,
+                            TelephonyManager.NETWORK_TYPE_LTE,
+                            enableViLte ? 1 : 0,
+                            mImsConfigListener);
+                }
             }
         } catch (ImsException e) {
             log("setAdvanced4GMode() : " + e);