Search in sources :

Example 6 with VoLteServiceState

use of android.telephony.VoLteServiceState in project android_frameworks_base by crdroidandroid.

the class TelephonyRegistry method notifyVoLteServiceStateChanged.

public void notifyVoLteServiceStateChanged(VoLteServiceState lteState) {
    if (!checkNotifyPermission("notifyVoLteServiceStateChanged()")) {
        return;
    }
    synchronized (mRecords) {
        mVoLteServiceState = lteState;
        for (Record r : mRecords) {
            if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_VOLTE_STATE)) {
                try {
                    r.callback.onVoLteServiceStateChanged(new VoLteServiceState(mVoLteServiceState));
                } catch (RemoteException ex) {
                    mRemoveList.add(r.binder);
                }
            }
        }
        handleRemoveListLocked();
    }
}
Also used : VoLteServiceState(android.telephony.VoLteServiceState) RemoteException(android.os.RemoteException)

Example 7 with VoLteServiceState

use of android.telephony.VoLteServiceState in project android_frameworks_opt_telephony by LineageOS.

the class DefaultPhoneNotifierTest method testNotifyVoLteServiceStateChanged.

@Test
@SmallTest
public void testNotifyVoLteServiceStateChanged() throws Exception {
    VoLteServiceState state = new VoLteServiceState(VoLteServiceState.NOT_SUPPORTED);
    mDefaultPhoneNotifierUT.notifyVoLteServiceStateChanged(mPhone, state);
    verify(mTelephonyRegisteryMock).notifyVoLteServiceStateChanged(state);
    state = new VoLteServiceState(VoLteServiceState.HANDOVER_COMPLETED);
    mDefaultPhoneNotifierUT.notifyVoLteServiceStateChanged(mPhone, state);
    verify(mTelephonyRegisteryMock).notifyVoLteServiceStateChanged(state);
}
Also used : VoLteServiceState(android.telephony.VoLteServiceState) SmallTest(android.test.suitebuilder.annotation.SmallTest) Test(org.junit.Test) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 8 with VoLteServiceState

use of android.telephony.VoLteServiceState in project android_frameworks_opt_telephony by LineageOS.

the class VoLteServiceStateTest method testCopy.

@SmallTest
public void testCopy() {
    VoLteServiceState state = new VoLteServiceState(VoLteServiceState.HANDOVER_STARTED);
    VoLteServiceState newState = new VoLteServiceState(state);
    assertEquals(state, newState);
}
Also used : VoLteServiceState(android.telephony.VoLteServiceState) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 9 with VoLteServiceState

use of android.telephony.VoLteServiceState in project android_frameworks_opt_telephony by LineageOS.

the class VoLteServiceStateTest method testParcel.

@SmallTest
public void testParcel() {
    VoLteServiceState state = new VoLteServiceState(VoLteServiceState.HANDOVER_FAILED);
    Parcel p = Parcel.obtain();
    state.writeToParcel(p, 0);
    p.setDataPosition(0);
    VoLteServiceState newState = VoLteServiceState.CREATOR.createFromParcel(p);
    assertEquals(state, newState);
}
Also used : Parcel(android.os.Parcel) VoLteServiceState(android.telephony.VoLteServiceState) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 10 with VoLteServiceState

use of android.telephony.VoLteServiceState in project android_frameworks_opt_telephony by LineageOS.

the class VoLteServiceStateTest method testGetState.

@SmallTest
public void testGetState() {
    VoLteServiceState state = new VoLteServiceState(VoLteServiceState.HANDOVER_STARTED);
    assertEquals(VoLteServiceState.HANDOVER_STARTED, state.getSrvccState());
}
Also used : VoLteServiceState(android.telephony.VoLteServiceState) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Aggregations

VoLteServiceState (android.telephony.VoLteServiceState)11 RemoteException (android.os.RemoteException)5 SmallTest (android.test.suitebuilder.annotation.SmallTest)5 Bundle (android.os.Bundle)1 Parcel (android.os.Parcel)1 ImsCall (com.android.ims.ImsCall)1 ImsPhoneCall (com.android.internal.telephony.imsphone.ImsPhoneCall)1 Test (org.junit.Test)1