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

Commit af7a21ab authored by Nazanin's avatar Nazanin Committed by Automerger Merge Worker
Browse files

add inCall tone for in call quality notification am: 4b8b1f52

Original change: https://android-review.googlesource.com/c/platform/packages/services/Telecomm/+/1618591

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifd89c53787d323c4d6e97fc16a96f696447dfe4e
parents d94befbd 4b8b1f52
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);
            }