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

Commit f003ab8a authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Merge "Fix unit tests and coverage"

am: 1414f0e8

Change-Id: I2f64ced00c8bfd0da1733c66f64ec80a2a6d7176
parents a33fdea9 1414f0e8
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
@@ -683,7 +683,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);