Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1414f0e8 authored by Hall Liu's avatar Hall Liu Committed by Gerrit Code Review
Browse files

Merge "Fix unit tests and coverage"

parents d9215e09 5b8551ef
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -51,15 +51,15 @@ lite_test_telecom() {
    # Build and exit script early if build fails

    if [ $coverage = true ] ; then
      emma_opt="EMMA_INSTRUMENT_STATIC=true"
      emma_opt="EMMA_INSTRUMENT=true LOCAL_EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true"
    else
      emma_opt="EMMA_INSTRUMENT_STATIC=false"
      emma_opt="EMMA_INSTRUMENT=false"
    fi

    if [ $installwdep = true ] ; then
      mmma -j40 "packages/services/Telecomm/tests" ${emma_opt}
      (export ${emma_opt}; mmma -j40 "packages/services/Telecomm/tests")
    else
      mmm "packages/services/Telecomm/tests" ${emma_opt}
      (export ${emma_opt}; mmm "packages/services/Telecomm/tests")
    fi
    if [ $? -ne 0 ] ; then
      echo "Make failed! try using -a instead of -i if building with coverage"
+1 −1
Original line number Diff line number Diff line
@@ -648,7 +648,7 @@ public class CallsManager extends Call.ListenerBase
        return true;
    }

    boolean hasVideoCall() {
    public boolean hasVideoCall() {
        for (Call call : mCalls) {
            if (VideoProfile.isVideo(call.getVideoState())) {
                return true;
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ public class CallAudioRouteStateMachineTest

        when(mockCallsManager.getForegroundCall()).thenReturn(fakeCall);
        when(mockCallsManager.getLock()).thenReturn(mLock);
        when(mockCallsManager.hasVideoCall()).thenReturn(false);
        when(fakeCall.getConnectionService()).thenReturn(mockConnectionServiceWrapper);
        when(fakeCall.isAlive()).thenReturn(true);
        when(fakeCall.getSupportedAudioRoutes()).thenReturn(CallAudioState.ROUTE_ALL);