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

Commit e7b693e2 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Add Telecom events for local ringback.

Adding telecom events for start/stop of local ringback.

Test: Manual
Bug: 77791838
Change-Id: I476c1178a1f18de488e413827b64955ca08c98f8
parent 78aa4843
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -134,6 +134,8 @@ public class LogUtils {
        public static final String ACCEPT_HANDOVER = "ACCEPT_HANDOVER";
        public static final String HANDOVER_COMPLETE = "HANDOVER_COMPLETE";
        public static final String HANDOVER_FAILED = "HANDOVER_FAILED";
        public static final String START_RINBACK = "START_RINGBACK";
        public static final String STOP_RINGBACK = "STOP_RINGBACK";

        public static class Timings {
            public static final String ACCEPT_TIMING = "accept";
+6 −1
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@

package com.android.server.telecom;

import static com.android.server.telecom.LogUtils.Events.START_RINBACK;
import static com.android.server.telecom.LogUtils.Events.STOP_RINGBACK;

import com.android.internal.util.Preconditions;
import android.telecom.Log;

@@ -64,7 +67,8 @@ public class RingbackPlayer {

        mCall = call;
        if (mTonePlayer == null) {
            Log.d(this, "Playing the ringback tone for %s.", call);
            Log.i(this, "Playing the ringback tone for %s.", call);
            Log.addEvent(call, START_RINBACK);
            mTonePlayer = mPlayerFactory.createPlayer(InCallTonePlayer.TONE_RING_BACK);
            mTonePlayer.startTone();
        }
@@ -85,6 +89,7 @@ public class RingbackPlayer {
                Log.w(this, "No player found to stop.");
            } else {
                Log.i(this, "Stopping the ringback tone for %s.", call);
                Log.addEvent(call, STOP_RINGBACK);
                mTonePlayer.stopTone();
                mTonePlayer = null;
            }