Use the new phone number extra for incoming calls
Bug: 17485366
Change-Id: I4033c6adc64651109de290c9bcea6e6eaa46b0b6
diff --git a/src/com/android/telecomm/CallsManager.java b/src/com/android/telecomm/CallsManager.java
index 2be03c5..5d77a6d 100644
--- a/src/com/android/telecomm/CallsManager.java
+++ b/src/com/android/telecomm/CallsManager.java
@@ -24,6 +24,7 @@
import android.telecomm.ParcelableConference;
import android.telecomm.PhoneAccountHandle;
import android.telephony.DisconnectCause;
+import android.telephony.TelephonyManager;
import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.ImmutableList;
@@ -256,11 +257,10 @@
*/
void processIncomingCallIntent(PhoneAccountHandle phoneAccountHandle, Bundle extras) {
Log.d(this, "processIncomingCallIntent");
- // Create a call with no handle. The handle is eventually set when the call is attached
- // to a connection service.
+ Uri handle = extras.getParcelable(TelephonyManager.EXTRA_INCOMING_NUMBER);
Call call = new Call(
mConnectionServiceRepository,
- null /* handle */,
+ handle,
null /* gatewayInfo */,
null /* connectionManagerPhoneAccount */,
phoneAccountHandle,