use of android.telephony.ims.feature.MMTelFeature in project platform_frameworks_base by android.
the class ImsService method resolveMMTelFeature.
// Be sure to lock on mFeatures before accessing this method
private MMTelFeature resolveMMTelFeature(int slotId, int featureType) {
SparseArray<ImsFeature> features = getImsFeatureMap(slotId);
MMTelFeature feature = null;
if (features != null) {
feature = resolveImsFeature(features, featureType, MMTelFeature.class);
}
return feature;
}
use of android.telephony.ims.feature.MMTelFeature in project android_frameworks_opt_telephony by LineageOS.
the class ImsServiceTest method testCreateMMTelFeature.
@Test
@SmallTest
public void testCreateMMTelFeature() throws RemoteException {
IImsMmTelFeature f = mTestImsServiceBinder.createMmTelFeature(TEST_SLOT_0, mTestCallback);
mTestImsService.mTestMmTelFeature.sendSetFeatureState(ImsFeature.STATE_READY);
SparseArray<ImsFeature> features = mTestImsService.getFeatures(TEST_SLOT_0);
ImsFeature featureToVerify = features.get(ImsFeature.FEATURE_MMTEL);
MmTelFeature testMMTelFeature = null;
if (featureToVerify instanceof MmTelFeature) {
testMMTelFeature = (MmTelFeature) featureToVerify;
} else {
fail();
}
assertEquals(mTestImsService.mSpyMmTelFeature, testMMTelFeature);
// Verify that upon creating a feature, we assign the callback and get the set feature state
// when querying it.
verify(mTestImsService.mSpyMmTelFeature).addImsFeatureStatusCallback(eq(mTestCallback));
assertEquals(ImsFeature.STATE_READY, f.getFeatureState());
}
Aggregations