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

Commit 9ed6ad9b authored by Srikanth Chintala's avatar Srikanth Chintala Committed by android-build-merger
Browse files

Emergency redial implementation

am: 1c586c6f

Change-Id: I9db1f384fe7d6dfd2743ef347d4dd3bf8f8eafa6
parents 02e00dd7 1c586c6f
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.telecom.PhoneAccountHandle;
import android.telecom.StatusHints;
import android.telecom.TelecomManager;
import android.telecom.VideoProfile;
import android.telephony.TelephonyManager;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telecom.IConnectionService;
@@ -829,6 +830,24 @@ public class ConnectionServiceWrapper extends ServiceBinder {
                Log.endSession();
            }
        }

        @Override
        public void onPhoneAccountChanged(String callId, PhoneAccountHandle pHandle,
                Session.Info sessionInfo) throws RemoteException {
            Log.startSession(sessionInfo, "CSW.oPAC");
            long token = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
                    Call call = mCallIdMapper.getCall(callId);
                    if (call != null) {
                        call.setTargetPhoneAccount(pHandle);
                    }
                }
            } finally {
                Binder.restoreCallingIdentity(token);
                Log.endSession();
            }
        }
    }

    private final Adapter mAdapter = new Adapter();