use of com.android.ims.ImsManager in project android_frameworks_opt_telephony by LineageOS.
the class ImsManagerTest method testSetValues.
@Test
@SmallTest
public void testSetValues() {
ImsManager imsManager = getImsManagerAndInitProvisionedValues();
imsManager.setWfcMode(ImsConfig.WfcModeFeatureValueConstants.CELLULAR_PREFERRED);
verify(mSubscriptionController, times(1)).setSubscriptionProperty(eq(mSubId[0]), eq(SubscriptionManager.WFC_IMS_MODE), eq("1"));
imsManager.setWfcMode(ImsConfig.WfcModeFeatureValueConstants.CELLULAR_PREFERRED, true);
verify(mSubscriptionController, times(1)).setSubscriptionProperty(eq(mSubId[0]), eq(SubscriptionManager.WFC_IMS_ROAMING_MODE), eq("1"));
imsManager.setVtSetting(false);
verify(mSubscriptionController, times(1)).setSubscriptionProperty(eq(mSubId[0]), eq(SubscriptionManager.VT_IMS_ENABLED), eq("0"));
// enhanced 4g mode must be editable to use setEnhanced4gLteModeSetting
mBundle.putBoolean(CarrierConfigManager.KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, ENHANCED_4G_MODE_EDITABLE);
imsManager.setEnhanced4gLteModeSetting(true);
verify(mSubscriptionController, times(1)).setSubscriptionProperty(eq(mSubId[0]), eq(SubscriptionManager.ENHANCED_4G_MODE_ENABLED), eq("1"));
imsManager.setWfcSetting(true);
verify(mSubscriptionController, times(1)).setSubscriptionProperty(eq(mSubId[0]), eq(SubscriptionManager.WFC_IMS_ENABLED), eq("1"));
}
Aggregations