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

Commit 9c71effd authored by Tyler Gunn's avatar Tyler Gunn Committed by Gerrit Code Review
Browse files

Merge "Add Telecom events for local ringback."

parents aa7d8d88 e7b693e2
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;
            }