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

Commit 42cc568e authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Merge "Add Telecom events for local ringback."

am: 9c71effd

Change-Id: I9407d4ab294ee76ac0c92ee9e1f72a951b99bb94
parents 772e81e0 9c71effd
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;
            }