Check WiFi call setting
This CL does the following:
- checks the WiFi call setting when placing calls
- if the WiFi call setting is ASK_EVERY_TIME then displays a dialog
asking the user to choose
- changes the default WiFi call setting to always use WiFi calling
- set Call.isWifiCall when using Wifi calling
Change-Id: I9dc6086c41d4fe1b2a693ff44b5266697eae0f89
diff --git a/src/com/android/phone/CallModeler.java b/src/com/android/phone/CallModeler.java
index e4ed147..3e37f29 100644
--- a/src/com/android/phone/CallModeler.java
+++ b/src/com/android/phone/CallModeler.java
@@ -555,6 +555,13 @@
changed = true;
}
+ final boolean isWifiCall = connection.getCall().getPhone().getPhoneType() ==
+ PhoneConstants.PHONE_TYPE_THIRD_PARTY;
+ if (call.isWifiCall() != isWifiCall) {
+ call.setIsWifiCall(isWifiCall);
+ changed = true;
+ }
+
final Call.DisconnectCause newDisconnectCause =
translateDisconnectCauseFromTelephony(connection.getDisconnectCause());
if (call.getDisconnectCause() != newDisconnectCause) {
@@ -650,7 +657,7 @@
final boolean supportHold = PhoneUtils.okToSupportHold(mCallManager);
final boolean canHold = (supportHold ? PhoneUtils.okToHoldCall(mCallManager) : false);
final boolean genericConf = isForConference &&
- (connection.getCall().getPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA);
+ (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA);
// only applies to active calls
if (callIsActive) {