Use provisioning status to decide whether to display Enhanced 4G option.
Bug: 18576107
Change-Id: I6128271ad53cfd5acb5b1746e3c2a491045ec8de
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
index b60c963..02b4a72 100644
--- a/src/com/android/phone/MobileNetworkSettings.java
+++ b/src/com/android/phone/MobileNetworkSettings.java
@@ -498,7 +498,8 @@
MyHandler.MESSAGE_GET_PREFERRED_NETWORK_TYPE));
}
- if (ImsManager.isVolteEnabledByPlatform(this)) {
+ if (ImsManager.isVolteEnabledByPlatform(this)
+ && ImsManager.isVolteProvisionedOnDevice(this)) {
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
}
@@ -656,7 +657,8 @@
}
// Enable enhanced 4G LTE mode settings depending on whether exists on platform
- if (!ImsManager.isVolteEnabledByPlatform(this)) {
+ if (!(ImsManager.isVolteEnabledByPlatform(this)
+ && ImsManager.isVolteProvisionedOnDevice(this))) {
Preference pref = prefSet.findPreference(BUTTON_4G_LTE_KEY);
if (pref != null) {
prefSet.removePreference(pref);
@@ -733,7 +735,8 @@
super.onPause();
if (DBG) log("onPause:+");
- if (ImsManager.isVolteEnabledByPlatform(this)) {
+ if (ImsManager.isVolteEnabledByPlatform(this)
+ && ImsManager.isVolteProvisionedOnDevice(this)) {
TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
}