Loading src/com/android/server/telecom/NewOutgoingCallIntentBroadcaster.java +21 −3 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.os.UserHandle; import android.telecom.GatewayInfo; import android.telecom.Log; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.telecom.VideoProfile; import android.telephony.DisconnectCause; Loading Loading @@ -262,6 +263,21 @@ public class NewOutgoingCallIntentBroadcaster { return DisconnectCause.INVALID_NUMBER; } // True for all managed calls, false for self-managed calls. boolean sendNewOutgoingCallBroadcast = true; PhoneAccountHandle targetPhoneAccount = mIntent.getParcelableExtra( TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE); if (targetPhoneAccount != null) { PhoneAccount phoneAccount = mCallsManager.getPhoneAccountRegistrar().getPhoneAccountUnchecked( targetPhoneAccount); if (phoneAccount != null && phoneAccount.isSelfManaged()) { callImmediately = true; sendNewOutgoingCallBroadcast = false; Log.i(this, "Skipping NewOutgoingCallBroadcast for self-managed call."); } } if (callImmediately) { String scheme = isUriNumber ? PhoneAccount.SCHEME_SIP : PhoneAccount.SCHEME_TEL; boolean speakerphoneOn = mIntent.getBooleanExtra( Loading @@ -278,9 +294,11 @@ public class NewOutgoingCallIntentBroadcaster { // initiate the call again because of the presence of the EXTRA_ALREADY_CALLED extra. } if (sendNewOutgoingCallBroadcast) { UserHandle targetUser = mCall.getInitiatingUser(); Log.i(this, "Sending NewOutgoingCallBroadcast for %s to %s", mCall, targetUser); broadcastIntent(intent, number, !callImmediately, targetUser); } return DisconnectCause.NOT_DISCONNECTED; } Loading Loading
src/com/android/server/telecom/NewOutgoingCallIntentBroadcaster.java +21 −3 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.os.UserHandle; import android.telecom.GatewayInfo; import android.telecom.Log; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.telecom.VideoProfile; import android.telephony.DisconnectCause; Loading Loading @@ -262,6 +263,21 @@ public class NewOutgoingCallIntentBroadcaster { return DisconnectCause.INVALID_NUMBER; } // True for all managed calls, false for self-managed calls. boolean sendNewOutgoingCallBroadcast = true; PhoneAccountHandle targetPhoneAccount = mIntent.getParcelableExtra( TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE); if (targetPhoneAccount != null) { PhoneAccount phoneAccount = mCallsManager.getPhoneAccountRegistrar().getPhoneAccountUnchecked( targetPhoneAccount); if (phoneAccount != null && phoneAccount.isSelfManaged()) { callImmediately = true; sendNewOutgoingCallBroadcast = false; Log.i(this, "Skipping NewOutgoingCallBroadcast for self-managed call."); } } if (callImmediately) { String scheme = isUriNumber ? PhoneAccount.SCHEME_SIP : PhoneAccount.SCHEME_TEL; boolean speakerphoneOn = mIntent.getBooleanExtra( Loading @@ -278,9 +294,11 @@ public class NewOutgoingCallIntentBroadcaster { // initiate the call again because of the presence of the EXTRA_ALREADY_CALLED extra. } if (sendNewOutgoingCallBroadcast) { UserHandle targetUser = mCall.getInitiatingUser(); Log.i(this, "Sending NewOutgoingCallBroadcast for %s to %s", mCall, targetUser); broadcastIntent(intent, number, !callImmediately, targetUser); } return DisconnectCause.NOT_DISCONNECTED; } Loading