Merge "Improve connection manager logging." into rvc-dev
This commit is contained in:
@@ -2102,12 +2102,12 @@ public abstract class ConnectionService extends Service {
|
|||||||
|
|
||||||
|
|
||||||
private void abort(String callId) {
|
private void abort(String callId) {
|
||||||
Log.d(this, "abort %s", callId);
|
Log.i(this, "abort %s", callId);
|
||||||
findConnectionForAction(callId, "abort").onAbort();
|
findConnectionForAction(callId, "abort").onAbort();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void answerVideo(String callId, int videoState) {
|
private void answerVideo(String callId, int videoState) {
|
||||||
Log.d(this, "answerVideo %s", callId);
|
Log.i(this, "answerVideo %s", callId);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "answer").onAnswer(videoState);
|
findConnectionForAction(callId, "answer").onAnswer(videoState);
|
||||||
} else {
|
} else {
|
||||||
@@ -2116,7 +2116,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void answer(String callId) {
|
private void answer(String callId) {
|
||||||
Log.d(this, "answer %s", callId);
|
Log.i(this, "answer %s", callId);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "answer").onAnswer();
|
findConnectionForAction(callId, "answer").onAnswer();
|
||||||
} else {
|
} else {
|
||||||
@@ -2125,12 +2125,12 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void deflect(String callId, Uri address) {
|
private void deflect(String callId, Uri address) {
|
||||||
Log.d(this, "deflect %s", callId);
|
Log.i(this, "deflect %s", callId);
|
||||||
findConnectionForAction(callId, "deflect").onDeflect(address);
|
findConnectionForAction(callId, "deflect").onDeflect(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reject(String callId) {
|
private void reject(String callId) {
|
||||||
Log.d(this, "reject %s", callId);
|
Log.i(this, "reject %s", callId);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "reject").onReject();
|
findConnectionForAction(callId, "reject").onReject();
|
||||||
} else {
|
} else {
|
||||||
@@ -2139,34 +2139,34 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void reject(String callId, String rejectWithMessage) {
|
private void reject(String callId, String rejectWithMessage) {
|
||||||
Log.d(this, "reject %s with message", callId);
|
Log.i(this, "reject %s with message", callId);
|
||||||
findConnectionForAction(callId, "reject").onReject(rejectWithMessage);
|
findConnectionForAction(callId, "reject").onReject(rejectWithMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reject(String callId, @android.telecom.Call.RejectReason int rejectReason) {
|
private void reject(String callId, @android.telecom.Call.RejectReason int rejectReason) {
|
||||||
Log.d(this, "reject %s with reason %d", callId, rejectReason);
|
Log.i(this, "reject %s with reason %d", callId, rejectReason);
|
||||||
findConnectionForAction(callId, "reject").onReject(rejectReason);
|
findConnectionForAction(callId, "reject").onReject(rejectReason);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void transfer(String callId, Uri number, boolean isConfirmationRequired) {
|
private void transfer(String callId, Uri number, boolean isConfirmationRequired) {
|
||||||
Log.d(this, "transfer %s", callId);
|
Log.i(this, "transfer %s", callId);
|
||||||
findConnectionForAction(callId, "transfer").onTransfer(number, isConfirmationRequired);
|
findConnectionForAction(callId, "transfer").onTransfer(number, isConfirmationRequired);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void consultativeTransfer(String callId, String otherCallId) {
|
private void consultativeTransfer(String callId, String otherCallId) {
|
||||||
Log.d(this, "consultativeTransfer %s", callId);
|
Log.i(this, "consultativeTransfer %s", callId);
|
||||||
Connection connection1 = findConnectionForAction(callId, "consultativeTransfer");
|
Connection connection1 = findConnectionForAction(callId, "consultativeTransfer");
|
||||||
Connection connection2 = findConnectionForAction(otherCallId, " consultativeTransfer");
|
Connection connection2 = findConnectionForAction(otherCallId, " consultativeTransfer");
|
||||||
connection1.onTransfer(connection2);
|
connection1.onTransfer(connection2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void silence(String callId) {
|
private void silence(String callId) {
|
||||||
Log.d(this, "silence %s", callId);
|
Log.i(this, "silence %s", callId);
|
||||||
findConnectionForAction(callId, "silence").onSilence();
|
findConnectionForAction(callId, "silence").onSilence();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void disconnect(String callId) {
|
private void disconnect(String callId) {
|
||||||
Log.d(this, "disconnect %s", callId);
|
Log.i(this, "disconnect %s", callId);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "disconnect").onDisconnect();
|
findConnectionForAction(callId, "disconnect").onDisconnect();
|
||||||
} else {
|
} else {
|
||||||
@@ -2175,7 +2175,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void hold(String callId) {
|
private void hold(String callId) {
|
||||||
Log.d(this, "hold %s", callId);
|
Log.i(this, "hold %s", callId);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "hold").onHold();
|
findConnectionForAction(callId, "hold").onHold();
|
||||||
} else {
|
} else {
|
||||||
@@ -2184,7 +2184,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void unhold(String callId) {
|
private void unhold(String callId) {
|
||||||
Log.d(this, "unhold %s", callId);
|
Log.i(this, "unhold %s", callId);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "unhold").onUnhold();
|
findConnectionForAction(callId, "unhold").onUnhold();
|
||||||
} else {
|
} else {
|
||||||
@@ -2193,7 +2193,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onCallAudioStateChanged(String callId, CallAudioState callAudioState) {
|
private void onCallAudioStateChanged(String callId, CallAudioState callAudioState) {
|
||||||
Log.d(this, "onAudioStateChanged %s %s", callId, callAudioState);
|
Log.i(this, "onAudioStateChanged %s %s", callId, callAudioState);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "onCallAudioStateChanged").setCallAudioState(
|
findConnectionForAction(callId, "onCallAudioStateChanged").setCallAudioState(
|
||||||
callAudioState);
|
callAudioState);
|
||||||
@@ -2204,7 +2204,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void playDtmfTone(String callId, char digit) {
|
private void playDtmfTone(String callId, char digit) {
|
||||||
Log.d(this, "playDtmfTone %s %c", callId, digit);
|
Log.i(this, "playDtmfTone %s %c", callId, digit);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "playDtmfTone").onPlayDtmfTone(digit);
|
findConnectionForAction(callId, "playDtmfTone").onPlayDtmfTone(digit);
|
||||||
} else {
|
} else {
|
||||||
@@ -2213,7 +2213,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void stopDtmfTone(String callId) {
|
private void stopDtmfTone(String callId) {
|
||||||
Log.d(this, "stopDtmfTone %s", callId);
|
Log.i(this, "stopDtmfTone %s", callId);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "stopDtmfTone").onStopDtmfTone();
|
findConnectionForAction(callId, "stopDtmfTone").onStopDtmfTone();
|
||||||
} else {
|
} else {
|
||||||
@@ -2222,7 +2222,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void conference(String callId1, String callId2) {
|
private void conference(String callId1, String callId2) {
|
||||||
Log.d(this, "conference %s, %s", callId1, callId2);
|
Log.i(this, "conference %s, %s", callId1, callId2);
|
||||||
|
|
||||||
// Attempt to get second connection or conference.
|
// Attempt to get second connection or conference.
|
||||||
Connection connection2 = findConnectionForAction(callId2, "conference");
|
Connection connection2 = findConnectionForAction(callId2, "conference");
|
||||||
@@ -2269,7 +2269,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void splitFromConference(String callId) {
|
private void splitFromConference(String callId) {
|
||||||
Log.d(this, "splitFromConference(%s)", callId);
|
Log.i(this, "splitFromConference(%s)", callId);
|
||||||
|
|
||||||
Connection connection = findConnectionForAction(callId, "splitFromConference");
|
Connection connection = findConnectionForAction(callId, "splitFromConference");
|
||||||
if (connection == getNullConnection()) {
|
if (connection == getNullConnection()) {
|
||||||
@@ -2284,7 +2284,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void mergeConference(String callId) {
|
private void mergeConference(String callId) {
|
||||||
Log.d(this, "mergeConference(%s)", callId);
|
Log.i(this, "mergeConference(%s)", callId);
|
||||||
Conference conference = findConferenceForAction(callId, "mergeConference");
|
Conference conference = findConferenceForAction(callId, "mergeConference");
|
||||||
if (conference != null) {
|
if (conference != null) {
|
||||||
conference.onMerge();
|
conference.onMerge();
|
||||||
@@ -2292,7 +2292,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void swapConference(String callId) {
|
private void swapConference(String callId) {
|
||||||
Log.d(this, "swapConference(%s)", callId);
|
Log.i(this, "swapConference(%s)", callId);
|
||||||
Conference conference = findConferenceForAction(callId, "swapConference");
|
Conference conference = findConferenceForAction(callId, "swapConference");
|
||||||
if (conference != null) {
|
if (conference != null) {
|
||||||
conference.onSwap();
|
conference.onSwap();
|
||||||
@@ -2300,7 +2300,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void addConferenceParticipants(String callId, List<Uri> participants) {
|
private void addConferenceParticipants(String callId, List<Uri> participants) {
|
||||||
Log.d(this, "addConferenceParticipants(%s)", callId);
|
Log.i(this, "addConferenceParticipants(%s)", callId);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "addConferenceParticipants")
|
findConnectionForAction(callId, "addConferenceParticipants")
|
||||||
.onAddConferenceParticipants(participants);
|
.onAddConferenceParticipants(participants);
|
||||||
@@ -2318,7 +2318,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
* @param callId The ID of the call to pull.
|
* @param callId The ID of the call to pull.
|
||||||
*/
|
*/
|
||||||
private void pullExternalCall(String callId) {
|
private void pullExternalCall(String callId) {
|
||||||
Log.d(this, "pullExternalCall(%s)", callId);
|
Log.i(this, "pullExternalCall(%s)", callId);
|
||||||
Connection connection = findConnectionForAction(callId, "pullExternalCall");
|
Connection connection = findConnectionForAction(callId, "pullExternalCall");
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
connection.onPullExternalCall();
|
connection.onPullExternalCall();
|
||||||
@@ -2335,7 +2335,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
* @param extras Extras associated with the event.
|
* @param extras Extras associated with the event.
|
||||||
*/
|
*/
|
||||||
private void sendCallEvent(String callId, String event, Bundle extras) {
|
private void sendCallEvent(String callId, String event, Bundle extras) {
|
||||||
Log.d(this, "sendCallEvent(%s, %s)", callId, event);
|
Log.i(this, "sendCallEvent(%s, %s)", callId, event);
|
||||||
Connection connection = findConnectionForAction(callId, "sendCallEvent");
|
Connection connection = findConnectionForAction(callId, "sendCallEvent");
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
connection.onCallEvent(event, extras);
|
connection.onCallEvent(event, extras);
|
||||||
@@ -2348,7 +2348,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
* @param callId The ID of the call which completed handover.
|
* @param callId The ID of the call which completed handover.
|
||||||
*/
|
*/
|
||||||
private void notifyHandoverComplete(String callId) {
|
private void notifyHandoverComplete(String callId) {
|
||||||
Log.d(this, "notifyHandoverComplete(%s)", callId);
|
Log.i(this, "notifyHandoverComplete(%s)", callId);
|
||||||
Connection connection = findConnectionForAction(callId, "notifyHandoverComplete");
|
Connection connection = findConnectionForAction(callId, "notifyHandoverComplete");
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
connection.onHandoverComplete();
|
connection.onHandoverComplete();
|
||||||
@@ -2368,7 +2368,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
* @param extras The new extras bundle.
|
* @param extras The new extras bundle.
|
||||||
*/
|
*/
|
||||||
private void handleExtrasChanged(String callId, Bundle extras) {
|
private void handleExtrasChanged(String callId, Bundle extras) {
|
||||||
Log.d(this, "handleExtrasChanged(%s, %s)", callId, extras);
|
Log.i(this, "handleExtrasChanged(%s, %s)", callId, extras);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "handleExtrasChanged").handleExtrasChanged(extras);
|
findConnectionForAction(callId, "handleExtrasChanged").handleExtrasChanged(extras);
|
||||||
} else if (mConferenceById.containsKey(callId)) {
|
} else if (mConferenceById.containsKey(callId)) {
|
||||||
@@ -2377,7 +2377,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startRtt(String callId, Connection.RttTextStream rttTextStream) {
|
private void startRtt(String callId, Connection.RttTextStream rttTextStream) {
|
||||||
Log.d(this, "startRtt(%s)", callId);
|
Log.i(this, "startRtt(%s)", callId);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "startRtt").onStartRtt(rttTextStream);
|
findConnectionForAction(callId, "startRtt").onStartRtt(rttTextStream);
|
||||||
} else if (mConferenceById.containsKey(callId)) {
|
} else if (mConferenceById.containsKey(callId)) {
|
||||||
@@ -2386,7 +2386,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void stopRtt(String callId) {
|
private void stopRtt(String callId) {
|
||||||
Log.d(this, "stopRtt(%s)", callId);
|
Log.i(this, "stopRtt(%s)", callId);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "stopRtt").onStopRtt();
|
findConnectionForAction(callId, "stopRtt").onStopRtt();
|
||||||
} else if (mConferenceById.containsKey(callId)) {
|
} else if (mConferenceById.containsKey(callId)) {
|
||||||
@@ -2395,7 +2395,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleRttUpgradeResponse(String callId, Connection.RttTextStream rttTextStream) {
|
private void handleRttUpgradeResponse(String callId, Connection.RttTextStream rttTextStream) {
|
||||||
Log.d(this, "handleRttUpgradeResponse(%s, %s)", callId, rttTextStream == null);
|
Log.i(this, "handleRttUpgradeResponse(%s, %s)", callId, rttTextStream == null);
|
||||||
if (mConnectionById.containsKey(callId)) {
|
if (mConnectionById.containsKey(callId)) {
|
||||||
findConnectionForAction(callId, "handleRttUpgradeResponse")
|
findConnectionForAction(callId, "handleRttUpgradeResponse")
|
||||||
.handleRttUpgradeResponse(rttTextStream);
|
.handleRttUpgradeResponse(rttTextStream);
|
||||||
@@ -2405,7 +2405,7 @@ public abstract class ConnectionService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onPostDialContinue(String callId, boolean proceed) {
|
private void onPostDialContinue(String callId, boolean proceed) {
|
||||||
Log.d(this, "onPostDialContinue(%s)", callId);
|
Log.i(this, "onPostDialContinue(%s)", callId);
|
||||||
findConnectionForAction(callId, "stopDtmfTone").onPostDialContinue(proceed);
|
findConnectionForAction(callId, "stopDtmfTone").onPostDialContinue(proceed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,9 @@
|
|||||||
|
|
||||||
package android.telecom;
|
package android.telecom;
|
||||||
|
|
||||||
|
import android.annotation.NonNull;
|
||||||
import android.compat.annotation.UnsupportedAppUsage;
|
import android.compat.annotation.UnsupportedAppUsage;
|
||||||
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@@ -29,8 +31,10 @@ import android.text.TextUtils;
|
|||||||
import com.android.internal.annotations.VisibleForTesting;
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
import com.android.internal.util.IndentingPrintWriter;
|
import com.android.internal.util.IndentingPrintWriter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.IllegalFormatException;
|
import java.util.IllegalFormatException;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages logging for the entire module.
|
* Manages logging for the entire module.
|
||||||
@@ -212,6 +216,16 @@ public class Log {
|
|||||||
return getSessionManager().getExternalSession();
|
return getSessionManager().getExternalSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves external session information, providing a context for the recipient of the session
|
||||||
|
* info where the external session came from.
|
||||||
|
* @param ownerInfo The external owner info.
|
||||||
|
* @return New {@link Session.Info} instance with owner info set.
|
||||||
|
*/
|
||||||
|
public static Session.Info getExternalSession(@NonNull String ownerInfo) {
|
||||||
|
return getSessionManager().getExternalSession(ownerInfo);
|
||||||
|
}
|
||||||
|
|
||||||
public static void cancelSubsession(Session subsession) {
|
public static void cancelSubsession(Session subsession) {
|
||||||
getSessionManager().cancelSubsession(subsession);
|
getSessionManager().cancelSubsession(subsession);
|
||||||
}
|
}
|
||||||
@@ -481,4 +495,34 @@ public class Log {
|
|||||||
}
|
}
|
||||||
return String.format(Locale.US, "%s: %s%s", prefix, msg, sessionPostfix);
|
return String.format(Locale.US, "%s: %s%s", prefix, msg, sessionPostfix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates an abbreviated version of the package name from a component.
|
||||||
|
* E.g. com.android.phone becomes cap
|
||||||
|
* @param componentName The component name to abbreviate.
|
||||||
|
* @return Abbreviation of empty string if component is null.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static String getPackageAbbreviation(ComponentName componentName) {
|
||||||
|
if (componentName == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return getPackageAbbreviation(componentName.getPackageName());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates an abbreviated version of the package name.
|
||||||
|
* E.g. com.android.phone becomes cap
|
||||||
|
* @param packageName The packageName name to abbreviate.
|
||||||
|
* @return Abbreviation of empty string if package is null.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static String getPackageAbbreviation(String packageName) {
|
||||||
|
if (packageName == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return Arrays.stream(packageName.split("\\."))
|
||||||
|
.map(s -> s.substring(0,1))
|
||||||
|
.collect(Collectors.joining(""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
package android.telecom.Logging;
|
package android.telecom.Logging;
|
||||||
|
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
|
import android.annotation.Nullable;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.telecom.Log;
|
import android.telecom.Log;
|
||||||
@@ -59,10 +60,12 @@ public class Session {
|
|||||||
public static class Info implements Parcelable {
|
public static class Info implements Parcelable {
|
||||||
public final String sessionId;
|
public final String sessionId;
|
||||||
public final String methodPath;
|
public final String methodPath;
|
||||||
|
public final String ownerInfo;
|
||||||
|
|
||||||
private Info(String id, String path) {
|
private Info(String id, String path, String owner) {
|
||||||
sessionId = id;
|
sessionId = id;
|
||||||
methodPath = path;
|
methodPath = path;
|
||||||
|
ownerInfo = owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Info getInfo (Session s) {
|
public static Info getInfo (Session s) {
|
||||||
@@ -70,7 +73,28 @@ public class Session {
|
|||||||
// not get multiple stacking external sessions (unless we have DEBUG level logging or
|
// not get multiple stacking external sessions (unless we have DEBUG level logging or
|
||||||
// lower).
|
// lower).
|
||||||
return new Info(s.getFullSessionId(), s.getFullMethodPath(
|
return new Info(s.getFullSessionId(), s.getFullMethodPath(
|
||||||
!Log.DEBUG && s.isSessionExternal()));
|
!Log.DEBUG && s.isSessionExternal()), s.getOwnerInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Info getExternalInfo(Session s, @Nullable String ownerInfo) {
|
||||||
|
// When creating session information for an existing session, the caller may pass in a
|
||||||
|
// context to be passed along to the recipient of the external session info.
|
||||||
|
// So, for example, if telecom has an active session with owner 'cad', and Telecom is
|
||||||
|
// calling into Telephony and providing external session info, it would pass in 'cast'
|
||||||
|
// as the owner info. This would result in Telephony seeing owner info 'cad/cast',
|
||||||
|
// which would make it very clear in the Telephony logs the chain of package calls which
|
||||||
|
// ultimately resulted in the logs.
|
||||||
|
String newInfo = ownerInfo != null && s.getOwnerInfo() != null
|
||||||
|
// If we've got both, concatenate them.
|
||||||
|
? s.getOwnerInfo() + "/" + ownerInfo
|
||||||
|
// Otherwise use whichever is present.
|
||||||
|
: ownerInfo != null ? ownerInfo : s.getOwnerInfo();
|
||||||
|
|
||||||
|
// Create Info based on the truncated method path if the session is external, so we do
|
||||||
|
// not get multiple stacking external sessions (unless we have DEBUG level logging or
|
||||||
|
// lower).
|
||||||
|
return new Info(s.getFullSessionId(), s.getFullMethodPath(
|
||||||
|
!Log.DEBUG && s.isSessionExternal()), newInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Responsible for creating Info objects for deserialized Parcels. */
|
/** Responsible for creating Info objects for deserialized Parcels. */
|
||||||
@@ -80,7 +104,8 @@ public class Session {
|
|||||||
public Info createFromParcel(Parcel source) {
|
public Info createFromParcel(Parcel source) {
|
||||||
String id = source.readString();
|
String id = source.readString();
|
||||||
String methodName = source.readString();
|
String methodName = source.readString();
|
||||||
return new Info(id, methodName);
|
String ownerInfo = source.readString();
|
||||||
|
return new Info(id, methodName, ownerInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -100,6 +125,7 @@ public class Session {
|
|||||||
public void writeToParcel(Parcel destination, int flags) {
|
public void writeToParcel(Parcel destination, int flags) {
|
||||||
destination.writeString(sessionId);
|
destination.writeString(sessionId);
|
||||||
destination.writeString(methodPath);
|
destination.writeString(methodPath);
|
||||||
|
destination.writeString(ownerInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,6 +232,14 @@ public class Session {
|
|||||||
return Info.getInfo(this);
|
return Info.getInfo(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Info getExternalInfo(@Nullable String ownerInfo) {
|
||||||
|
return Info.getExternalInfo(this, ownerInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOwnerInfo() {
|
||||||
|
return mOwnerInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public String getSessionId() {
|
public String getSessionId() {
|
||||||
return mSessionId;
|
return mSessionId;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package android.telecom.Logging;
|
package android.telecom.Logging;
|
||||||
|
|
||||||
|
import android.annotation.Nullable;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
@@ -180,7 +181,7 @@ public class SessionManager {
|
|||||||
Log.d(LOGGING_TAG, Session.START_EXTERNAL_SESSION);
|
Log.d(LOGGING_TAG, Session.START_EXTERNAL_SESSION);
|
||||||
Session externalSession = new Session(Session.EXTERNAL_INDICATOR + sessionInfo.sessionId,
|
Session externalSession = new Session(Session.EXTERNAL_INDICATOR + sessionInfo.sessionId,
|
||||||
sessionInfo.methodPath, System.currentTimeMillis(),
|
sessionInfo.methodPath, System.currentTimeMillis(),
|
||||||
false /*isStartedFromActiveSession*/, null);
|
false /*isStartedFromActiveSession*/, sessionInfo.ownerInfo);
|
||||||
externalSession.setIsExternal(true);
|
externalSession.setIsExternal(true);
|
||||||
// Mark the external session as already completed, since we have no way of knowing when
|
// Mark the external session as already completed, since we have no way of knowing when
|
||||||
// the external session actually has completed.
|
// the external session actually has completed.
|
||||||
@@ -224,7 +225,7 @@ public class SessionManager {
|
|||||||
// Start execution time of the session will be overwritten in continueSession(...).
|
// Start execution time of the session will be overwritten in continueSession(...).
|
||||||
Session newSubsession = new Session(threadSession.getNextChildId(),
|
Session newSubsession = new Session(threadSession.getNextChildId(),
|
||||||
threadSession.getShortMethodName(), System.currentTimeMillis(),
|
threadSession.getShortMethodName(), System.currentTimeMillis(),
|
||||||
isStartedFromActiveSession, null);
|
isStartedFromActiveSession, threadSession.getOwnerInfo());
|
||||||
threadSession.addChild(newSubsession);
|
threadSession.addChild(newSubsession);
|
||||||
newSubsession.setParentSession(threadSession);
|
newSubsession.setParentSession(threadSession);
|
||||||
|
|
||||||
@@ -238,12 +239,18 @@ public class SessionManager {
|
|||||||
return newSubsession;
|
return newSubsession;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized Session.Info getExternalSession() {
|
||||||
|
return getExternalSession(null /* ownerInfo */);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the information of the currently active Session. This information is parcelable and
|
* Retrieve the information of the currently active Session. This information is parcelable and
|
||||||
* is used to create an external Session ({@link #startExternalSession(Session.Info, String)}).
|
* is used to create an external Session ({@link #startExternalSession(Session.Info, String)}).
|
||||||
* If there is no Session active, this method will return null.
|
* If there is no Session active, this method will return null.
|
||||||
|
* @param ownerInfo Owner information for the session.
|
||||||
|
* @return The session information
|
||||||
*/
|
*/
|
||||||
public synchronized Session.Info getExternalSession() {
|
public synchronized Session.Info getExternalSession(@Nullable String ownerInfo) {
|
||||||
int threadId = getCallingThreadId();
|
int threadId = getCallingThreadId();
|
||||||
Session threadSession = mSessionMapper.get(threadId);
|
Session threadSession = mSessionMapper.get(threadId);
|
||||||
if (threadSession == null) {
|
if (threadSession == null) {
|
||||||
@@ -251,8 +258,7 @@ public class SessionManager {
|
|||||||
"active.");
|
"active.");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
return threadSession.getExternalInfo(ownerInfo);
|
||||||
return threadSession.getInfo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -30,13 +30,16 @@ import android.os.Bundle;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
|
import android.telecom.Logging.Session;
|
||||||
import android.view.Surface;
|
import android.view.Surface;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A connection provided to a {@link ConnectionService} by another {@code ConnectionService}
|
* A connection provided to a {@link ConnectionService} by another {@code ConnectionService}
|
||||||
@@ -655,6 +658,8 @@ public final class RemoteConnection {
|
|||||||
private int mCallerDisplayNamePresentation;
|
private int mCallerDisplayNamePresentation;
|
||||||
private RemoteConference mConference;
|
private RemoteConference mConference;
|
||||||
private Bundle mExtras;
|
private Bundle mExtras;
|
||||||
|
private String mCallingPackage;
|
||||||
|
private String mCallingPackageAbbreviation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
@@ -667,6 +672,13 @@ public final class RemoteConnection {
|
|||||||
mConnectionService = connectionService;
|
mConnectionService = connectionService;
|
||||||
mConnected = true;
|
mConnected = true;
|
||||||
mState = Connection.STATE_INITIALIZING;
|
mState = Connection.STATE_INITIALIZING;
|
||||||
|
if (request != null && request.getExtras() != null
|
||||||
|
&& request.getExtras().containsKey(
|
||||||
|
Connection.EXTRA_REMOTE_CONNECTION_ORIGINATING_PACKAGE_NAME)) {
|
||||||
|
mCallingPackage = request.getExtras().getString(
|
||||||
|
Connection.EXTRA_REMOTE_CONNECTION_ORIGINATING_PACKAGE_NAME);
|
||||||
|
mCallingPackageAbbreviation = Log.getPackageAbbreviation(mCallingPackage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -705,6 +717,8 @@ public final class RemoteConnection {
|
|||||||
Bundle newExtras = new Bundle();
|
Bundle newExtras = new Bundle();
|
||||||
newExtras.putString(Connection.EXTRA_ORIGINAL_CONNECTION_ID, callId);
|
newExtras.putString(Connection.EXTRA_ORIGINAL_CONNECTION_ID, callId);
|
||||||
putExtras(newExtras);
|
putExtras(newExtras);
|
||||||
|
mCallingPackage = callingPackage;
|
||||||
|
mCallingPackageAbbreviation = Log.getPackageAbbreviation(mCallingPackage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -899,11 +913,14 @@ public final class RemoteConnection {
|
|||||||
* Instructs this {@code RemoteConnection} to abort.
|
* Instructs this {@code RemoteConnection} to abort.
|
||||||
*/
|
*/
|
||||||
public void abort() {
|
public void abort() {
|
||||||
|
Log.startSession("RC.a", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.abort(mConnectionId, null /*Session.Info*/);
|
mConnectionService.abort(mConnectionId, Log.getExternalSession());
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -911,11 +928,14 @@ public final class RemoteConnection {
|
|||||||
* Instructs this {@link Connection#STATE_RINGING} {@code RemoteConnection} to answer.
|
* Instructs this {@link Connection#STATE_RINGING} {@code RemoteConnection} to answer.
|
||||||
*/
|
*/
|
||||||
public void answer() {
|
public void answer() {
|
||||||
|
Log.startSession("RC.an", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.answer(mConnectionId, null /*Session.Info*/);
|
mConnectionService.answer(mConnectionId, Log.getExternalSession());
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -925,11 +945,14 @@ public final class RemoteConnection {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public void answer(int videoState) {
|
public void answer(int videoState) {
|
||||||
|
Log.startSession("RC.an2", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.answerVideo(mConnectionId, videoState, null /*Session.Info*/);
|
mConnectionService.answerVideo(mConnectionId, videoState, null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -937,11 +960,14 @@ public final class RemoteConnection {
|
|||||||
* Instructs this {@link Connection#STATE_RINGING} {@code RemoteConnection} to reject.
|
* Instructs this {@link Connection#STATE_RINGING} {@code RemoteConnection} to reject.
|
||||||
*/
|
*/
|
||||||
public void reject() {
|
public void reject() {
|
||||||
|
Log.startSession("RC.r", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.reject(mConnectionId, null /*Session.Info*/);
|
mConnectionService.reject(mConnectionId, null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -949,11 +975,14 @@ public final class RemoteConnection {
|
|||||||
* Instructs this {@code RemoteConnection} to go on hold.
|
* Instructs this {@code RemoteConnection} to go on hold.
|
||||||
*/
|
*/
|
||||||
public void hold() {
|
public void hold() {
|
||||||
|
Log.startSession("RC.h", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.hold(mConnectionId, null /*Session.Info*/);
|
mConnectionService.hold(mConnectionId, null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -961,11 +990,14 @@ public final class RemoteConnection {
|
|||||||
* Instructs this {@link Connection#STATE_HOLDING} call to release from hold.
|
* Instructs this {@link Connection#STATE_HOLDING} call to release from hold.
|
||||||
*/
|
*/
|
||||||
public void unhold() {
|
public void unhold() {
|
||||||
|
Log.startSession("RC.u", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.unhold(mConnectionId, null /*Session.Info*/);
|
mConnectionService.unhold(mConnectionId, null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -973,11 +1005,15 @@ public final class RemoteConnection {
|
|||||||
* Instructs this {@code RemoteConnection} to disconnect.
|
* Instructs this {@code RemoteConnection} to disconnect.
|
||||||
*/
|
*/
|
||||||
public void disconnect() {
|
public void disconnect() {
|
||||||
|
Log.startSession("RC.d", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.disconnect(mConnectionId, null /*Session.Info*/);
|
mConnectionService.disconnect(mConnectionId, Log.getExternalSession(
|
||||||
|
mCallingPackageAbbreviation));
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -991,11 +1027,14 @@ public final class RemoteConnection {
|
|||||||
* value must be one of {@code '0'} through {@code '9'}, {@code '*'} or {@code '#'}.
|
* value must be one of {@code '0'} through {@code '9'}, {@code '*'} or {@code '#'}.
|
||||||
*/
|
*/
|
||||||
public void playDtmfTone(char digit) {
|
public void playDtmfTone(char digit) {
|
||||||
|
Log.startSession("RC.pDT", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.playDtmfTone(mConnectionId, digit, null /*Session.Info*/);
|
mConnectionService.playDtmfTone(mConnectionId, digit, null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1007,11 +1046,14 @@ public final class RemoteConnection {
|
|||||||
* currently playing, this method will do nothing.
|
* currently playing, this method will do nothing.
|
||||||
*/
|
*/
|
||||||
public void stopDtmfTone() {
|
public void stopDtmfTone() {
|
||||||
|
Log.startSession("RC.sDT", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.stopDtmfTone(mConnectionId, null /*Session.Info*/);
|
mConnectionService.stopDtmfTone(mConnectionId, null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1037,12 +1079,16 @@ public final class RemoteConnection {
|
|||||||
* @param proceed Whether or not to continue with the post-dial sequence.
|
* @param proceed Whether or not to continue with the post-dial sequence.
|
||||||
*/
|
*/
|
||||||
public void postDialContinue(boolean proceed) {
|
public void postDialContinue(boolean proceed) {
|
||||||
|
Log.startSession("RC.pDC", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.onPostDialContinue(mConnectionId, proceed,
|
mConnectionService.onPostDialContinue(mConnectionId, proceed,
|
||||||
null /*Session.Info*/);
|
null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
// bliss
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1052,11 +1098,14 @@ public final class RemoteConnection {
|
|||||||
* See {@link Call#pullExternalCall()} for more information.
|
* See {@link Call#pullExternalCall()} for more information.
|
||||||
*/
|
*/
|
||||||
public void pullExternalCall() {
|
public void pullExternalCall() {
|
||||||
|
Log.startSession("RC.pEC", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.pullExternalCall(mConnectionId, null /*Session.Info*/);
|
mConnectionService.pullExternalCall(mConnectionId, null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1079,12 +1128,15 @@ public final class RemoteConnection {
|
|||||||
* @param state The audio state of this {@code RemoteConnection}.
|
* @param state The audio state of this {@code RemoteConnection}.
|
||||||
*/
|
*/
|
||||||
public void setCallAudioState(CallAudioState state) {
|
public void setCallAudioState(CallAudioState state) {
|
||||||
|
Log.startSession("RC.sCAS", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.onCallAudioStateChanged(mConnectionId, state,
|
mConnectionService.onCallAudioStateChanged(mConnectionId, state,
|
||||||
null /*Session.Info*/);
|
null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1095,12 +1147,15 @@ public final class RemoteConnection {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public void startRtt(@NonNull Connection.RttTextStream rttTextStream) {
|
public void startRtt(@NonNull Connection.RttTextStream rttTextStream) {
|
||||||
|
Log.startSession("RC.sR", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.startRtt(mConnectionId, rttTextStream.getFdFromInCall(),
|
mConnectionService.startRtt(mConnectionId, rttTextStream.getFdFromInCall(),
|
||||||
rttTextStream.getFdToInCall(), null /*Session.Info*/);
|
rttTextStream.getFdToInCall(), null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1110,11 +1165,14 @@ public final class RemoteConnection {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public void stopRtt() {
|
public void stopRtt() {
|
||||||
|
Log.startSession("RC.stR", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
mConnectionService.stopRtt(mConnectionId, null /*Session.Info*/);
|
mConnectionService.stopRtt(mConnectionId, null /*Session.Info*/);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1128,6 +1186,7 @@ public final class RemoteConnection {
|
|||||||
* the in-call app.
|
* the in-call app.
|
||||||
*/
|
*/
|
||||||
public void sendRttUpgradeResponse(@Nullable Connection.RttTextStream rttTextStream) {
|
public void sendRttUpgradeResponse(@Nullable Connection.RttTextStream rttTextStream) {
|
||||||
|
Log.startSession("RC.sRUR", getActiveOwnerInfo());
|
||||||
try {
|
try {
|
||||||
if (mConnected) {
|
if (mConnected) {
|
||||||
if (rttTextStream == null) {
|
if (rttTextStream == null) {
|
||||||
@@ -1140,6 +1199,8 @@ public final class RemoteConnection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (RemoteException ignored) {
|
} catch (RemoteException ignored) {
|
||||||
|
} finally {
|
||||||
|
Log.endSession();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1164,6 +1225,22 @@ public final class RemoteConnection {
|
|||||||
return mConference;
|
return mConference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the owner info for the currently active session. We want to make sure that any owner
|
||||||
|
* info from the original call into the connection manager gets retained so that the full
|
||||||
|
* context of the calls can be traced down to Telephony.
|
||||||
|
* Example: Telecom will provide owner info in it's external session info that indicates
|
||||||
|
* 'cast' as the calling owner.
|
||||||
|
* @return The active owner
|
||||||
|
*/
|
||||||
|
private String getActiveOwnerInfo() {
|
||||||
|
Session.Info info = Log.getExternalSession();
|
||||||
|
if (info == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return info.ownerInfo;
|
||||||
|
}
|
||||||
|
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
String getId() {
|
String getId() {
|
||||||
return mConnectionId;
|
return mConnectionId;
|
||||||
|
|||||||
Reference in New Issue
Block a user