Search in sources :

Example 1 with MMTelFeature

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;
}
Also used : MMTelFeature(android.telephony.ims.feature.MMTelFeature) ImsFeature(android.telephony.ims.feature.ImsFeature)

Example 2 with MMTelFeature

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());
}
Also used : ImsFeature(android.telephony.ims.feature.ImsFeature) IImsMmTelFeature(android.telephony.ims.aidl.IImsMmTelFeature) IImsMmTelFeature(android.telephony.ims.aidl.IImsMmTelFeature) MmTelFeature(android.telephony.ims.feature.MmTelFeature) SmallTest(android.test.suitebuilder.annotation.SmallTest) Test(org.junit.Test) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Aggregations

ImsFeature (android.telephony.ims.feature.ImsFeature)2 IImsMmTelFeature (android.telephony.ims.aidl.IImsMmTelFeature)1 MMTelFeature (android.telephony.ims.feature.MMTelFeature)1 MmTelFeature (android.telephony.ims.feature.MmTelFeature)1 SmallTest (android.test.suitebuilder.annotation.SmallTest)1 Test (org.junit.Test)1