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

Commit 4b8b1f52 authored by Nazanin's avatar Nazanin
Browse files

add inCall tone for in call quality notification

Bug: 180435684
Test: none
Change-Id: I0deb572c717017210f4838b09a9f977550882ee3
parent 15ce91ef
Loading
Loading
Loading
Loading
+33.7 KiB

File added.

No diff preview for this file type.

+10 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ public class InCallTonePlayer extends Thread {
    public static final int TONE_VOICE_PRIVACY = 13;
    public static final int TONE_VIDEO_UPGRADE = 14;
    public static final int TONE_RTT_REQUEST = 15;
    public static final int TONE_IN_CALL_QUALITY_NOTIFICATION = 16;

    private static final int TONE_RESOURCE_ID_UNDEFINED = -1;

@@ -337,6 +338,15 @@ public class InCallTonePlayer extends Thread {
                    toneLengthMillis = 4000;
                    mediaResourceId = TONE_RESOURCE_ID_UNDEFINED;
                    break;
                case TONE_IN_CALL_QUALITY_NOTIFICATION:
                    // Don't use tone generator
                    toneType = ToneGenerator.TONE_UNKNOWN;
                    toneVolume = RELATIVE_VOLUME_UNDEFINED;
                    toneLengthMillis = 0;

                    // Use a tone resource file for a more rich, full-bodied tone experience.
                    mediaResourceId = R.raw.InCallQualityNotification;
                    break;
                default:
                    throw new IllegalStateException("Bad toneId: " + mToneId);
            }