[Settings] Replace isVolteEnabledByPlatform
Replace ImsManager#isVolteEnabledByPlatform() by ImsMmTelManager#isSupport(). Bug: 140542283 Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=Enhanced4gBasePreferenceControllerTest Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=Enhanced4gLteSliceHelperTest Change-Id: I656a00ad2c6120255e53d0b836945462258e01bb
This commit is contained in:
@@ -20,8 +20,10 @@ 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.feature.MmTelFeature;
|
||||
import android.telephony.ims.stub.ImsRegistrationImplBase;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
@@ -34,6 +36,8 @@ import com.android.settings.network.telephony.MobileNetworkUtils;
|
||||
*/
|
||||
public class VolteQueryImsState extends ImsQueryController {
|
||||
|
||||
private static final String LOG_TAG = "VolteQueryImsState";
|
||||
|
||||
private Context mContext;
|
||||
private int mSubId;
|
||||
|
||||
@@ -71,13 +75,15 @@ public class VolteQueryImsState extends ImsQueryController {
|
||||
* @return true when VoLTE has been enabled, otherwise false
|
||||
*/
|
||||
public boolean isVoLteProvisioned() {
|
||||
final ImsManager imsManager = getImsManager(mSubId);
|
||||
if (imsManager == null) {
|
||||
if (!isProvisionedOnDevice(mSubId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return imsManager.isVolteEnabledByPlatform()
|
||||
&& isProvisionedOnDevice(mSubId);
|
||||
try {
|
||||
return isEnabledByPlatform(mSubId);
|
||||
} catch (InterruptedException | IllegalArgumentException | ImsException exception) {
|
||||
Log.w(LOG_TAG, "fail to get VoLte supporting status. subId=" + mSubId, exception);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user