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

Commit 363911ad authored by Dheeraj Shetty's avatar Dheeraj Shetty Committed by Pavel Zhamaitsiak
Browse files

Use HD icon for EVS audio codecs.

Show HD icon for audio codecs EVS_WB, EVS_FB and EVS_SWB.

Bug: 28675902

Change-Id: I5550e6c9660c0ccd25418a33c44ee2c71ddd47b9
parent 27c763b0
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -937,8 +937,9 @@ public class ImsPhoneConnection extends Connection {

    /**
     * Determines the {@link ImsPhoneConnection} audio quality based on the local and remote
     * {@link ImsCallProfile}. If indicate a HQ audio call if the local stream profile
     * indicates AMR_WB or EVRC_WB and there is no remote restrict cause.
     * {@link ImsCallProfile}. Indicate a HD audio call if the local stream profile
     * is AMR_WB, EVRC_WB, EVS_WB, EVS_SWB, EVS_FB and
     * there is no remote restrict cause.
     *
     * @param localCallProfile The local call profile.
     * @param remoteCallProfile The remote call profile.
@@ -951,10 +952,18 @@ public class ImsPhoneConnection extends Connection {
            return AUDIO_QUALITY_STANDARD;
        }

        boolean isHighDef = (localCallProfile.mMediaProfile.mAudioQuality
        final boolean isEvsCodecHighDef = (localCallProfile.mMediaProfile.mAudioQuality
                        == ImsStreamMediaProfile.AUDIO_QUALITY_EVS_WB
                || localCallProfile.mMediaProfile.mAudioQuality
                        == ImsStreamMediaProfile.AUDIO_QUALITY_EVS_SWB
                || localCallProfile.mMediaProfile.mAudioQuality
                        == ImsStreamMediaProfile.AUDIO_QUALITY_EVS_FB);

        final boolean isHighDef = (localCallProfile.mMediaProfile.mAudioQuality
                        == ImsStreamMediaProfile.AUDIO_QUALITY_AMR_WB
                || localCallProfile.mMediaProfile.mAudioQuality
                        == ImsStreamMediaProfile.AUDIO_QUALITY_EVRC_WB)
                        == ImsStreamMediaProfile.AUDIO_QUALITY_EVRC_WB
                || isEvsCodecHighDef)
                && remoteCallProfile.mRestrictCause == ImsCallProfile.CALL_RESTRICT_CAUSE_NONE;
        return isHighDef ? AUDIO_QUALITY_HIGH_DEFINITION : AUDIO_QUALITY_STANDARD;
    }
@@ -992,4 +1001,3 @@ public class ImsPhoneConnection extends Connection {
        return mIsEmergency;
    }
}