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

Commit ef73b10a authored by Tyler Gunn's avatar Tyler Gunn Committed by Automerger Merge Worker
Browse files

Merge "Remote connection and request logging improvements." am: 7a9d64d9

Original change: https://android-review.googlesource.com/c/platform/packages/services/Telecomm/+/1392150

Change-Id: I89f92ed7d25e9629451e7eaf1c3efa2b32d81fb7
parents 191ac660 7a9d64d9
Loading
Loading
Loading
Loading
+85 −4
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.telecom;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
@@ -318,6 +319,8 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,

    private PhoneAccountHandle mTargetPhoneAccountHandle;

    private PhoneAccountHandle mRemotePhoneAccountHandle;

    private UserHandle mInitiatingUser;

    private final Handler mHandler = new Handler(Looper.getMainLooper());
@@ -845,19 +848,46 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        s.append(SimpleDateFormat.getDateTimeInstance().format(new Date(getCreationTimeMillis())));
        s.append("]");
        s.append(isIncoming() ? "(MT - incoming)" : "(MO - outgoing)");
        s.append("\n\tVia PhoneAccount: ");
        s.append("\n\t");

        PhoneAccountHandle targetPhoneAccountHandle = getTargetPhoneAccount();
        PhoneAccountHandle remotePhoneAccountHandle = getRemotePhoneAccountHandle();
        PhoneAccountHandle connectionMgrAccountHandle = getConnectionManagerPhoneAccount();
        PhoneAccountHandle delegatePhoneAccountHandle = getDelegatePhoneAccountHandle();
        boolean isTargetSameAsRemote = targetPhoneAccountHandle != null
                && targetPhoneAccountHandle.equals(remotePhoneAccountHandle);
        if (delegatePhoneAccountHandle.equals(targetPhoneAccountHandle)) {
            s.append(">>>");
        }
        s.append("Target");
        s.append(" PhoneAccount: ");
        if (targetPhoneAccountHandle != null) {
            s.append(targetPhoneAccountHandle);
            s.append(" (");
            s.append(getTargetPhoneAccountLabel());
            s.append(")");
            if (isTargetSameAsRemote) {
                s.append("(remote)");
            }
        } else {
            s.append("not set");
        }
        if (getConnectionManagerPhoneAccount() != null) {
        if (!isTargetSameAsRemote && remotePhoneAccountHandle != null) {
            // This is a RARE case and will likely not be seen in practice but it is possible.
            if (delegatePhoneAccountHandle.equals(remotePhoneAccountHandle)) {
                s.append("\n\t>>>Remote PhoneAccount: ");
            } else {
                s.append("\n\tRemote PhoneAccount: ");
            }
            s.append(remotePhoneAccountHandle);
        }
        if (connectionMgrAccountHandle != null) {
            if (delegatePhoneAccountHandle.equals(connectionMgrAccountHandle)) {
                s.append("\n\t>>>Conn mgr: ");
            } else {
                s.append("\n\tConn mgr: ");
            s.append(getConnectionManagerPhoneAccount());
            }
            s.append(connectionMgrAccountHandle);
        }

        s.append("\n\tTo address: ");
@@ -1371,6 +1401,45 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        checkIfRttCapable();
    }

    /**
     * @return the {@link PhoneAccountHandle} of the remote connection service which placing this
     * call was delegated to, or {@code null} if a remote connection service was not used.
     */
    public @Nullable PhoneAccountHandle getRemotePhoneAccountHandle() {
        return mRemotePhoneAccountHandle;
    }

    /**
     * Sets the {@link PhoneAccountHandle} of the remote connection service which placing this
     * call was delegated to.
     * @param accountHandle The phone account handle.
     */
    public void setRemotePhoneAccountHandle(PhoneAccountHandle accountHandle) {
        mRemotePhoneAccountHandle = accountHandle;
    }

    /**
     * Determines which {@link PhoneAccountHandle} is actually placing a call.
     * Where {@link #getRemotePhoneAccountHandle()} is non-null, the connection manager is placing
     * the call via a remote connection service, so the remote connection service's phone account
     * is the source.
     * Where {@link #getConnectionManagerPhoneAccount()} is non-null and
     * {@link #getRemotePhoneAccountHandle()} is null, the connection manager is placing the call
     * itself (even if the target specifies something else).
     * Finally, if neither of the above cases apply, the target phone account is the one actually
     * placing the call.
     * @return The {@link PhoneAccountHandle} which is actually placing a call.
     */
    public @NonNull PhoneAccountHandle getDelegatePhoneAccountHandle() {
        if (mRemotePhoneAccountHandle != null) {
            return mRemotePhoneAccountHandle;
        }
        if (mConnectionManagerPhoneAccountHandle != null) {
            return mConnectionManagerPhoneAccountHandle;
        }
        return mTargetPhoneAccountHandle;
    }

    @VisibleForTesting
    public PhoneAccountHandle getTargetPhoneAccount() {
        return mTargetPhoneAccountHandle;
@@ -2533,6 +2602,18 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
            mWasVolte = true;
        }

        if (extras.containsKey(Connection.EXTRA_ORIGINAL_CONNECTION_ID)) {
            setOriginalConnectionId(extras.getString(Connection.EXTRA_ORIGINAL_CONNECTION_ID));
        }

        // The remote connection service API can track the phone account which was originally
        // requested to create a connection via the remote connection service API; we store that so
        // we have some visibility into how a call was actually placed.
        if (mExtras.containsKey(Connection.EXTRA_REMOTE_PHONE_ACCOUNT_HANDLE)) {
            setRemotePhoneAccountHandle(extras.getParcelable(
                    Connection.EXTRA_REMOTE_PHONE_ACCOUNT_HANDLE));
        }

        // If the change originated from an InCallService, notify the connection service.
        if (source == SOURCE_INCALL_SERVICE) {
            if (mConnectionService != null) {
+1 −6
Original line number Diff line number Diff line
@@ -4217,13 +4217,8 @@ public class CallsManager extends Call.ListenerBase
        call.setCallerDisplayName(connection.getCallerDisplayName(),
                connection.getCallerDisplayNamePresentation());
        call.addListener(this);
        call.putExtras(Call.SOURCE_CONNECTION_SERVICE, connection.getExtras());

        // In case this connection was added via a ConnectionManager, keep track of the original
        // Connection ID as created by the originating ConnectionService.
        Bundle extras = connection.getExtras();
        if (extras != null && extras.containsKey(Connection.EXTRA_ORIGINAL_CONNECTION_ID)) {
            call.setOriginalConnectionId(extras.getString(Connection.EXTRA_ORIGINAL_CONNECTION_ID));
        }
        Log.i(this, "createCallForExistingConnection: %s", connection);
        Call parentCall = null;
        if (!TextUtils.isEmpty(connection.getParentCallId())) {
+46 −39
Original line number Diff line number Diff line
@@ -74,7 +74,8 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void handleCreateConnectionComplete(String callId, ConnectionRequest request,
                ParcelableConnection connection, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_HANDLE_CREATE_CONNECTION_COMPLETE);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_HANDLE_CREATE_CONNECTION_COMPLETE,
                    mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -104,7 +105,8 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void handleCreateConferenceComplete(String callId, ConnectionRequest request,
                ParcelableConference conference, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_HANDLE_CREATE_CONNECTION_COMPLETE);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_HANDLE_CREATE_CONNECTION_COMPLETE,
                    mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -133,7 +135,8 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void setActive(String callId, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_ACTIVE);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_ACTIVE,
                    mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -156,7 +159,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void setRinging(String callId, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_RINGING);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_RINGING, mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -179,7 +182,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void resetConnectionTime(String callId, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.rCCT");
            Log.startSession(sessionInfo, "CSW.rCCT", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -200,7 +203,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setVideoProvider(String callId, IVideoProvider videoProvider,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sVP");
            Log.startSession(sessionInfo, "CSW.sVP", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -221,7 +224,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void setDialing(String callId, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_DIALING);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_DIALING, mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -244,7 +247,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void setPulling(String callId, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_PULLING);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_PULLING, mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -266,7 +269,8 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setDisconnected(String callId, DisconnectCause disconnectCause,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_DISCONNECTED);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_DISCONNECTED,
                    mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -290,7 +294,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void setOnHold(String callId, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_ON_HOLD);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_ON_HOLD, mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -314,7 +318,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setRingbackRequested(String callId, boolean ringback,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.SRR");
            Log.startSession(sessionInfo, "CSW.SRR", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -337,7 +341,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void removeCall(String callId, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_REMOVE_CALL);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_REMOVE_CALL, mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -364,7 +368,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setConnectionCapabilities(String callId, int connectionCapabilities,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sCC");
            Log.startSession(sessionInfo, "CSW.sCC", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -389,7 +393,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setConnectionProperties(String callId, int connectionProperties,
                Session.Info sessionInfo) {
            Log.startSession("CSW.sCP");
            Log.startSession("CSW.sCP", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -411,7 +415,8 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setIsConferenced(String callId, String conferenceCallId,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_IS_CONFERENCED);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_IS_CONFERENCED,
                    mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -440,7 +445,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void setConferenceMergeFailed(String callId, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sCMF");
            Log.startSession(sessionInfo, "CSW.sCMF", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -467,7 +472,8 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void addConferenceCall(String callId, ParcelableConference parcelableConference,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_ADD_CONFERENCE_CALL);
            Log.startSession(sessionInfo, LogUtils.Sessions.CSW_ADD_CONFERENCE_CALL,
                    mPackageAbbreviation);

            if (parcelableConference.getConnectElapsedTimeMillis() != 0
                    && mContext.checkCallingOrSelfPermission(MODIFY_PHONE_STATE)
@@ -581,7 +587,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void onPostDialWait(String callId, String remaining,
                Session.Info sessionInfo) throws RemoteException {
            Log.startSession(sessionInfo, "CSW.oPDW");
            Log.startSession(sessionInfo, "CSW.oPDW", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -605,7 +611,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void onPostDialChar(String callId, char nextChar,
                Session.Info sessionInfo) throws RemoteException {
            Log.startSession(sessionInfo, "CSW.oPDC");
            Log.startSession(sessionInfo, "CSW.oPDC", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -630,7 +636,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        public void queryRemoteConnectionServices(RemoteServiceCallback callback,
                String callingPackage, Session.Info sessionInfo) {
            final UserHandle callingUserHandle = Binder.getCallingUserHandle();
            Log.startSession(sessionInfo, "CSW.qRCS");
            Log.startSession(sessionInfo, "CSW.qRCS", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -650,7 +656,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void setVideoState(String callId, int videoState, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sVS");
            Log.startSession(sessionInfo, "CSW.sVS", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -671,7 +677,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void setIsVoipAudioMode(String callId, boolean isVoip, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sIVAM");
            Log.startSession(sessionInfo, "CSW.sIVAM", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -693,7 +699,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setAudioRoute(String callId, int audioRoute,
                String bluetoothAddress, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sAR");
            Log.startSession(sessionInfo, "CSW.sAR", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -713,7 +719,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setStatusHints(String callId, StatusHints statusHints,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sSH");
            Log.startSession(sessionInfo, "CSW.sSH", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -734,7 +740,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void putExtras(String callId, Bundle extras, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.pE");
            Log.startSession(sessionInfo, "CSW.pE", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -755,7 +761,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void removeExtras(String callId, List<String> keys, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.rE");
            Log.startSession(sessionInfo, "CSW.rE", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -777,7 +783,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setAddress(String callId, Uri address, int presentation,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sA");
            Log.startSession(sessionInfo, "CSW.sA", mPackageAbbreviation);

            long token = Binder.clearCallingIdentity();
            try {
@@ -800,7 +806,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setCallerDisplayName(String callId, String callerDisplayName, int presentation,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sCDN");
            Log.startSession(sessionInfo, "CSW.sCDN", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -823,7 +829,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setConferenceableConnections(String callId, List<String> conferenceableCallIds,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sCC");
            Log.startSession(sessionInfo, "CSW.sCC", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -855,7 +861,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void addExistingConnection(String callId, ParcelableConnection connection,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.aEC");
            Log.startSession(sessionInfo, "CSW.aEC", mPackageAbbreviation);
            UserHandle userHandle = Binder.getCallingUserHandle();
            // Check that the Calling Package matches PhoneAccountHandle's Component Package
            PhoneAccountHandle callingPhoneAccountHandle = connection.getPhoneAccount();
@@ -944,7 +950,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void onConnectionEvent(String callId, String event, Bundle extras,
                Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.oCE");
            Log.startSession(sessionInfo, "CSW.oCE", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -972,7 +978,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void onRttInitiationFailure(String callId, int reason, Session.Info sessionInfo)
                throws RemoteException {
            Log.startSession(sessionInfo, "CSW.oRIF");
            Log.startSession(sessionInfo, "CSW.oRIF", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -999,7 +1005,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void onRemoteRttRequest(String callId, Session.Info sessionInfo)
                throws RemoteException {
            Log.startSession(sessionInfo, "CSW.oRRR");
            Log.startSession(sessionInfo, "CSW.oRRR", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -1025,7 +1031,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
                mAppOpsManager.checkPackage(Binder.getCallingUid(),
                        pHandle.getComponentName().getPackageName());
            }
            Log.startSession(sessionInfo, "CSW.oPAC");
            Log.startSession(sessionInfo, "CSW.oPAC", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -1046,7 +1052,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void onConnectionServiceFocusReleased(Session.Info sessionInfo)
                throws RemoteException {
            Log.startSession(sessionInfo, "CSW.oCSFR");
            Log.startSession(sessionInfo, "CSW.oCSFR", mPackageAbbreviation);
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
@@ -1065,7 +1071,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
        @Override
        public void setConferenceState(String callId, boolean isConference,
                Session.Info sessionInfo) throws RemoteException {
            Log.startSession(sessionInfo, "CSW.sCS");
            Log.startSession(sessionInfo, "CSW.sCS", mPackageAbbreviation);

            if (mContext.checkCallingOrSelfPermission(MODIFY_PHONE_STATE)
                    != PackageManager.PERMISSION_GRANTED) {
@@ -1093,7 +1099,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements

        @Override
        public void setCallDirection(String callId, int direction, Session.Info sessionInfo) {
            Log.startSession(sessionInfo, "CSW.sCD");
            Log.startSession(sessionInfo, "CSW.sCD", mPackageAbbreviation);

            if (mContext.checkCallingOrSelfPermission(MODIFY_PHONE_STATE)
                    != PackageManager.PERMISSION_GRANTED) {
@@ -1252,7 +1258,7 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
     */
    @VisibleForTesting
    public void createConnection(final Call call, final CreateConnectionResponse response) {
        Log.d(this, "createConnection(%s) via %s.", call, getComponentName());
        Log.i(this, "createConnection(%s) via %s.", call, getComponentName());
        BindCallback callback = new BindCallback() {
            @Override
            public void onSuccess() {
@@ -1291,7 +1297,8 @@ public class ConnectionServiceWrapper extends ServiceBinder implements
                }

                Log.addEvent(call, LogUtils.Events.START_CONNECTION,
                        Log.piiHandle(call.getHandle()));
                        Log.piiHandle(call.getHandle()) + " via:" +
                                getComponentName().getPackageName());

                ConnectionRequest connectionRequest = new ConnectionRequest.Builder()
                        .setAccountHandle(call.getTargetPhoneAccount())
+34 −29

File changed.

Preview size limit exceeded, changes collapsed.

+4 −4
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ public class InCallController extends CallsManagerListenerBase {
        private final ServiceConnection mServiceConnection = new ServiceConnection() {
            @Override
            public void onServiceConnected(ComponentName name, IBinder service) {
                Log.startSession("ICSBC.oSC");
                Log.startSession("ICSBC.oSC", ServiceBinder.getPackageAbbreviation(name));
                synchronized (mLock) {
                    try {
                        Log.d(this, "onServiceConnected: %s %b %b", name, mIsBound, mIsConnected);
@@ -216,7 +216,7 @@ public class InCallController extends CallsManagerListenerBase {

            @Override
            public void onServiceDisconnected(ComponentName name) {
                Log.startSession("ICSBC.oSD");
                Log.startSession("ICSBC.oSD", ServiceBinder.getPackageAbbreviation(name));
                synchronized (mLock) {
                    try {
                        Log.d(this, "onDisconnected: %s", name);
@@ -230,7 +230,7 @@ public class InCallController extends CallsManagerListenerBase {

            @Override
            public void onNullBinding(ComponentName name) {
                Log.startSession("ICSBC.oNB");
                Log.startSession("ICSBC.oNB", ServiceBinder.getPackageAbbreviation(name));
                synchronized (mLock) {
                    try {
                        Log.d(this, "onNullBinding: %s", name);
@@ -245,7 +245,7 @@ public class InCallController extends CallsManagerListenerBase {

            @Override
            public void onBindingDied(ComponentName name) {
                Log.startSession("ICSBC.oBD");
                Log.startSession("ICSBC.oBD", ServiceBinder.getPackageAbbreviation(name));
                synchronized (mLock) {
                    try {
                        Log.d(this, "onBindingDied: %s", name);
Loading