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/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index e59f4fb..7c828f9 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -98,6 +98,8 @@
EditPhoneNumberPreference.GetDefaultNumberListener {
private static final String LOG_TAG = "CallFeaturesSetting";
private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
+ // STOPSHIP if true. Flag to override behavior default behavior to hide VT setting.
+ private static final boolean ENABLE_VT_FLAG = false;
/**
* Intent action to bring up Voicemail Provider settings.
@@ -1677,10 +1679,13 @@
BUTTON_VOICEMAIL_NOTIFICATION_VIBRATE_KEY, false));
}
- mEnableVideoCalling.setChecked(PhoneGlobals.getInstance().phoneMgr.isVideoCallingEnabled());
- mEnableVideoCalling.setOnPreferenceChangeListener(this);
- // TODO: Perform checks to determine whether we should remove the preference.
- prefSet.removePreference(mEnableVideoCalling);
+ if (ImsUtil.isImsEnabled(mPhone.getContext()) && ENABLE_VT_FLAG) {
+ mEnableVideoCalling.setChecked(
+ PhoneGlobals.getInstance().phoneMgr.isVideoCallingEnabled());
+ mEnableVideoCalling.setOnPreferenceChangeListener(this);
+ } else {
+ prefSet.removePreference(mEnableVideoCalling);
+ }
// Look up the voicemail ringtone name asynchronously and update its preference.
new Thread(mVoicemailRingtoneLookupRunnable).start();