Search in sources :

Example 1 with ImsVideoCallProviderWrapper

use of com.android.ims.internal.ImsVideoCallProviderWrapper in project android_frameworks_opt_telephony by LineageOS.

the class ImsVideoProviderWrapperTest method setUp.

@Before
@Override
public void setUp() throws Exception {
    super.setUp();
    MockitoAnnotations.initMocks(this);
    mImsVideoCallProviderWrapper = new ImsVideoCallProviderWrapper(null, mVideoPauseTracker);
    when(mVideoPauseTracker.shouldPauseVideoFor(anyInt())).thenReturn(true);
    when(mVideoPauseTracker.shouldResumeVideoFor(anyInt())).thenReturn(true);
}
Also used : ImsVideoCallProviderWrapper(com.android.ims.internal.ImsVideoCallProviderWrapper) Before(org.junit.Before)

Example 2 with ImsVideoCallProviderWrapper

use of com.android.ims.internal.ImsVideoCallProviderWrapper in project android_frameworks_opt_telephony by LineageOS.

the class ImsPhoneCallTracker method setVideoCallProvider.

@UnsupportedAppUsage
private void setVideoCallProvider(ImsPhoneConnection conn, ImsCall imsCall) throws RemoteException {
    IImsVideoCallProvider imsVideoCallProvider = imsCall.getCallSession().getVideoCallProvider();
    if (imsVideoCallProvider != null) {
        // TODO: Remove this when we can better formalize the format of session modify requests.
        boolean useVideoPauseWorkaround = mPhone.getContext().getResources().getBoolean(com.android.internal.R.bool.config_useVideoPauseWorkaround);
        ImsVideoCallProviderWrapper imsVideoCallProviderWrapper = new ImsVideoCallProviderWrapper(imsVideoCallProvider);
        if (useVideoPauseWorkaround) {
            imsVideoCallProviderWrapper.setUseVideoPauseWorkaround(useVideoPauseWorkaround);
        }
        conn.setVideoProvider(imsVideoCallProviderWrapper);
        imsVideoCallProviderWrapper.registerForDataUsageUpdate(this, EVENT_VT_DATA_USAGE_UPDATE, imsCall);
        imsVideoCallProviderWrapper.addImsVideoProviderCallback(conn);
    }
}
Also used : IImsVideoCallProvider(com.android.ims.internal.IImsVideoCallProvider) ImsVideoCallProviderWrapper(com.android.ims.internal.ImsVideoCallProviderWrapper) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Aggregations

ImsVideoCallProviderWrapper (com.android.ims.internal.ImsVideoCallProviderWrapper)2 UnsupportedAppUsage (android.compat.annotation.UnsupportedAppUsage)1 IImsVideoCallProvider (com.android.ims.internal.IImsVideoCallProvider)1 Before (org.junit.Before)1