Show VoLTE UI when VoIMS opt-in enabled

Show VoLTE settings if VoIMS opt-in has been enabled irrespective
of other VoLTE settings.

Bug: 177010560
Test: Override hide_enhanced_4g_lte_bool to true and check the UI.
Change-Id: Ib305bae904f0028571874e204a415dfcd4457982
This commit is contained in:
Calvin Pan
2021-02-22 11:57:03 +08:00
parent a173e4eee5
commit 5691d50272
2 changed files with 21 additions and 1 deletions

View File

@@ -107,12 +107,18 @@ public class Enhanced4gBasePreferenceController extends TelephonyTogglePreferenc
if (!isModeMatched()) {
return CONDITIONALLY_UNAVAILABLE;
}
final VolteQueryImsState queryState = queryImsState(subId);
// Show VoLTE settings if VoIMS opt-in has been enabled irrespective of other VoLTE settings
if (queryState.isVoImsOptInEnabled()) {
return AVAILABLE;
}
final PersistableBundle carrierConfig = getCarrierConfigForSubId(subId);
if ((carrierConfig == null)
|| carrierConfig.getBoolean(CarrierConfigManager.KEY_HIDE_ENHANCED_4G_LTE_BOOL)) {
return CONDITIONALLY_UNAVAILABLE;
}
final VolteQueryImsState queryState = queryImsState(subId);
if (!queryState.isReadyToVoLte()) {
return CONDITIONALLY_UNAVAILABLE;
}