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

Commit 8b39f289 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4722539 from aab13d86 to pi-release

Change-Id: I97c5b397a809d08058e224ea89d706d4f8c6aa9b
parents 2afa0353 aab13d86
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="telecommAppLabel" product="default" msgid="382363169988504520">"ခေါ်ဆိုမှုစီမံခန့်ခွဲရေး"</string>
    <string name="userCallActivityLabel" product="default" msgid="5415173590855187131">"ဖုန်း"</string>
    <string name="unknown" msgid="6878797917991465859">"အကြောင်းအရာ မသိရှိ"</string>
    <string name="unknown" msgid="6878797917991465859">"မသိပါ"</string>
    <string name="notification_missedCallTitle" msgid="7554385905572364535">"လွဲသွားသော ဖုန်းခေါ်မှု"</string>
    <string name="notification_missedWorkCallTitle" msgid="6242489980390803090">"လွတ်သွားသည့် အလုပ်ဆိုင်ရာ ခ​ေါ်ဆိုမှု"</string>
    <string name="notification_missedCallsTitle" msgid="1361677948941502522">"လွဲသွားသော ဖုန်းခေါ်မှုများ"</string>
+16 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.pm.UserInfo;
import android.content.Intent;
import android.content.IntentFilter;
import android.media.AudioManager;
import android.media.AudioSystem;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -1896,6 +1897,7 @@ public class CallsManager extends Call.ListenerBase
        setCallState(call, CallState.DIALING, "dialing set explicitly");
        maybeMoveToSpeakerPhone(call);
        maybeTurnOffMute(call);
        ensureCallAudible();
    }

    void markCallAsPulling(Call call) {
@@ -1949,6 +1951,7 @@ public class CallsManager extends Call.ListenerBase
        } else {
            setCallState(call, CallState.ACTIVE, "active set explicitly");
            maybeMoveToSpeakerPhone(call);
            ensureCallAudible();
        }
    }

@@ -2945,6 +2948,19 @@ public class CallsManager extends Call.ListenerBase
        }
    }

    private void ensureCallAudible() {
        AudioManager am = mContext.getSystemService(AudioManager.class);
        if (am == null) {
            Log.w(this, "ensureCallAudible: audio manager is null");
            return;
        }
        if (am.getStreamVolume(AudioManager.STREAM_VOICE_CALL) == 0) {
            Log.i(this, "ensureCallAudible: voice call stream has volume 0. Adjusting to default.");
            am.setStreamVolume(AudioManager.STREAM_VOICE_CALL,
                    AudioSystem.getDefaultStreamVolume(AudioManager.STREAM_VOICE_CALL), 0);
        }
    }

    /**
     * Creates a new call for an existing connection.
     *
+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;
            }