From 1632cfe1e3f3f94295289a62c69ec5a0489d8f13 Mon Sep 17 00:00:00 2001 From: roldenburg Date: Thu, 30 Nov 2017 11:16:31 -0800 Subject: *** Reason for rollback *** Copybara is fixed for AOSP export Bug: 68665330 Test: rollback PiperOrigin-RevId: 177480870 Change-Id: I0ba38e213bb840436fa6dafc4af0a79019ee93f4 --- .../dialer/precall/externalreceiver/LaunchPreCallActivity.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'java/com/android/dialer/precall/externalreceiver') diff --git a/java/com/android/dialer/precall/externalreceiver/LaunchPreCallActivity.java b/java/com/android/dialer/precall/externalreceiver/LaunchPreCallActivity.java index f79546e54..6096d5192 100644 --- a/java/com/android/dialer/precall/externalreceiver/LaunchPreCallActivity.java +++ b/java/com/android/dialer/precall/externalreceiver/LaunchPreCallActivity.java @@ -21,6 +21,8 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; +import android.telecom.PhoneAccountHandle; +import android.telecom.TelecomManager; import com.android.dialer.callintent.CallInitiationType.Type; import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.configprovider.ConfigProvider; @@ -56,8 +58,14 @@ public class LaunchPreCallActivity extends Activity { ConfigProvider configProvider = ConfigProviderBindings.get(getApplicationContext()); Intent intent = getIntent(); CallIntentBuilder builder = new CallIntentBuilder(intent.getData(), Type.EXTERNAL_INITIATION); + + PhoneAccountHandle phoneAccountHandle = intent.getParcelableExtra(EXTRA_PHONE_ACCOUNT_HANDLE); + if (phoneAccountHandle == null) { + phoneAccountHandle = intent.getParcelableExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE); + } + builder - .setPhoneAccountHandle(intent.getParcelableExtra(EXTRA_PHONE_ACCOUNT_HANDLE)) + .setPhoneAccountHandle(phoneAccountHandle) .setIsVideoCall(intent.getBooleanExtra(EXTRA_IS_VIDEO_CALL, false)) .setCallSubject(intent.getStringExtra(EXTRA_CALL_SUBJECT)) .setAllowAssistedDial( -- cgit v1.2.3