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

@@ -16,11 +16,14 @@
package com.android.settings.network.ims;
import static android.telephony.ims.ProvisioningManager.KEY_VOIMS_OPT_IN_STATUS;
import android.content.Context;
import android.telecom.TelecomManager;
import android.telephony.AccessNetworkConstants;
import android.telephony.SubscriptionManager;
import android.telephony.ims.ImsException;
import android.telephony.ims.ProvisioningManager;
import android.telephony.ims.feature.MmTelFeature;
import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.util.Log;
@@ -133,4 +136,15 @@ public class VolteQueryImsState extends ImsQueryController {
}
return isEnabledByUser(mSubId);
}
/**
* Get VoIMS opt-in configuration.
*
* @return true when VoIMS opt-in has been enabled, otherwise false
*/
public boolean isVoImsOptInEnabled() {
int voImsOptInStatus = ProvisioningManager.createForSubscriptionId(mSubId)
.getProvisioningIntValue(KEY_VOIMS_OPT_IN_STATUS);
return voImsOptInStatus == ProvisioningManager.PROVISIONING_VALUE_ENABLED;
}
}