Broadcast phone number as a String
Need to maintain API compatibility; even though we're passing around
a Uri, we need to convert it to a String before sending it out.
Bug: 13551037
Change-Id: Id1d5435ebdb3a6d07990ef228840a5797dd70e0b
diff --git a/src/com/android/telecomm/PhoneStateBroadcaster.java b/src/com/android/telecomm/PhoneStateBroadcaster.java
index 4bb77d3..5728802 100644
--- a/src/com/android/telecomm/PhoneStateBroadcaster.java
+++ b/src/com/android/telecomm/PhoneStateBroadcaster.java
@@ -61,9 +61,10 @@
intent.putExtra(TelecommConstants.EXTRA_CALL_ID, call.getId());
// Populate both, since the original API was needlessly complicated.
- intent.putExtra(TelephonyManager.EXTRA_INCOMING_NUMBER, call.getHandle());
+ String callHandle = call.getHandle().getSchemeSpecificPart();
+ intent.putExtra(TelephonyManager.EXTRA_INCOMING_NUMBER, callHandle);
// TODO: See if we can add this (the current API only sets this on NEW_OUTGOING_CALL).
- intent.putExtra(Intent.EXTRA_PHONE_NUMBER, call.getHandle());
+ intent.putExtra(Intent.EXTRA_PHONE_NUMBER, callHandle);
// TODO: Replace these with real constants once this API has been vetted.
CallServiceWrapper callService = call.getCallService();