Fixing Google Voice to work with new incallui
We were not previously storing and sending the gateway information to
the UI. This change consolidates Call gateway functionality from
InCallUiState and PhoneUtils into a new class CallGatewayManager. It is
responsible for storing a mapping from the call's connection to the
gateway used to make that connection. It also adds gateway packagename
and number to the Call object sent to the UI so that it can show UI
appropriately.
bug: 10393622
Change-Id: Ic5a0b068475bcab60e8cc96470273e36005ccc2e
diff --git a/src/com/android/phone/OutgoingCallBroadcaster.java b/src/com/android/phone/OutgoingCallBroadcaster.java
index b9aea52..c5e8953 100644
--- a/src/com/android/phone/OutgoingCallBroadcaster.java
+++ b/src/com/android/phone/OutgoingCallBroadcaster.java
@@ -300,7 +300,7 @@
Intent newIntent = new Intent(Intent.ACTION_CALL, uri);
newIntent.putExtra(EXTRA_ACTUAL_NUMBER_TO_DIAL, number);
- PhoneUtils.checkAndCopyPhoneProviderExtras(intent, newIntent);
+ CallGatewayManager.checkAndCopyPhoneProviderExtras(intent, newIntent);
// Finally, launch the SipCallOptionHandler, with the copy of the
// original CALL intent stashed away in the EXTRA_NEW_CALL_INTENT
@@ -638,7 +638,7 @@
if (number != null) {
broadcastIntent.putExtra(Intent.EXTRA_PHONE_NUMBER, number);
}
- PhoneUtils.checkAndCopyPhoneProviderExtras(intent, broadcastIntent);
+ CallGatewayManager.checkAndCopyPhoneProviderExtras(intent, broadcastIntent);
broadcastIntent.putExtra(EXTRA_ALREADY_CALLED, callNow);
broadcastIntent.putExtra(EXTRA_ORIGINAL_URI, uri.toString());
// Need to raise foreground in-call UI as soon as possible while allowing 3rd party app