Hide/show Telephony video setting according to if IMS is enabled.
+ Add utility function get this value in ImsUtil.
+ Check this value to show/hide setting in Call Settings.
+ Include flag to override behavior and always hide VT, since it's
not shipping in MR1.
+ Take this account when reporting when the phone interface manager
reports whether we can make video calls.
Bug: 16014284
Change-Id: I31a13da61820988cdb53159126c6be9478b6a583
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index ffbdebf..c9eeeaf 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -2080,6 +2080,11 @@
@Override
public boolean isVideoCallingEnabled() {
enforceReadPermission();
- return mTelephonySharedPreferences.getBoolean(PREF_ENABLE_VIDEO_CALLING, true);
+ // Check the user preference and the system-level IMS setting. Even if the user has
+ // enabled video calling, if IMS is disabled we aren't able to support video calling.
+ // In the long run, we may instead need to check if there exists a connection service
+ // which can support video calling.
+ return mTelephonySharedPreferences.getBoolean(PREF_ENABLE_VIDEO_CALLING, true)
+ && ImsUtil.isImsEnabled(mPhone.getContext());
}
}