Passing subscription info in the calls logic to log it properly
In order to log the subscription information in call history and call
log, the calls logic layer needs to pass the information between classes
in the process.
Bug: 15473965
Change-Id: I85ca5444e5881a8ceb0eb950dfc6385cacd045cf
diff --git a/src/com/android/telecomm/CallsManager.java b/src/com/android/telecomm/CallsManager.java
index 174e59f..d53b583 100644
--- a/src/com/android/telecomm/CallsManager.java
+++ b/src/com/android/telecomm/CallsManager.java
@@ -23,6 +23,7 @@
import android.telecomm.CallServiceDescriptor;
import android.telecomm.CallState;
import android.telecomm.GatewayInfo;
+import android.telecomm.Subscription;
import android.telephony.DisconnectCause;
import com.google.common.base.Preconditions;
@@ -283,7 +284,7 @@
* @param speakerphoneOn Whether or not to turn the speakerphone on once the call connects.
*/
void placeOutgoingCall(Uri handle, ContactInfo contactInfo, GatewayInfo gatewayInfo,
- boolean speakerphoneOn) {
+ Subscription subscription, boolean speakerphoneOn) {
final Uri uriHandle = (gatewayInfo == null) ? handle : gatewayInfo.getGatewayHandle();
if (gatewayInfo == null) {
@@ -294,7 +295,8 @@
}
Call call = new Call(
- uriHandle, gatewayInfo, false /* isIncoming */, false /* isConference */);
+ uriHandle, gatewayInfo, subscription,
+ false /* isIncoming */, false /* isConference */);
call.setStartWithSpeakerphoneOn(speakerphoneOn);
// TODO(santoscordon): Move this to be a part of addCall()
@@ -474,7 +476,8 @@
// particular the original call's call service will be updated to the new call's call
// service.
Call tempCall = new Call(
- originalCall.getHandoffHandle(), originalCall.getGatewayInfo(), false, false);
+ originalCall.getHandoffHandle(), originalCall.getGatewayInfo(),
+ originalCall.getSubscription(), false, false);
tempCall.setOriginalCall(originalCall);
tempCall.setExtras(originalCall.getExtras());
mPendingHandoffCalls.add(tempCall);