Merge "Update call settings colors for GAR" into lmp-dev
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 4ef5c12..d7cac8d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -127,24 +127,42 @@
<!-- Label for list item which opens a dialog to select the default outgoing account -->
<string name="phone_accounts_make_calls_with">Make calls with</string>
+ <!-- Label for list item which opens a dialog to select the default outgoing account for SIP calls. -->
+ <string name="phone_accounts_make_sip_calls_with">Make SIP calls with</string>
<!-- Entry in dialog to "ask first" for accounts when making a call -->
<string name="phone_accounts_ask_every_time">Ask first</string>
+ <!-- Label for heading of the accounts section in the phone accounts settings screen. -->
+ <string name="phone_accounts_accounts_header">Accounts</string>
<!-- Label for invoking phone account selection screen -->
<string name="phone_accounts_choose_accounts">Choose accounts</string>
<!-- Label for heading in the phone account selection screen -->
<string name="phone_accounts_selection_header">Phone accounts</string>
+ <!-- Title for the button to add a new sip account. [CHAR LIMIT=NONE] -->
+ <string name="phone_accounts_add_sip_account">Add SIP account</string>
+ <!-- Description label for icon to configure a phone account's settings. -->
+ <string name="phone_accounts_configure_account_settings">Configure account settings</string>
<!-- Title for setting to select Wi-Fi call manager account -->
<string name="phone_account_wifi_calling">Wi-Fi calling</string>
<!-- Indication for option to not use a Wi-Fi call manager -->
<string name="wifi_calling_do_not_use">Do not use Wi-Fi calling</string>
+ <!-- Indication for option to not use a call assistant. -->
+ <string name="wifi_calling_do_not_use_call_assistant">Do not use call assistant</string>
<!-- Label for selected Wi-Fi call manager -->
<string name="wifi_calling_call_assistant">Call assistant</string>
<!-- Label for switch setting to enable/disable the use of SIM call managers. -->
<string name="wifi_calling_use_call_assistant">Use call assistant</string>
+ <!-- Label for selectecting a Wi-Fi call manager -->
+ <string name="wifi_calling_select_call_assistant">Choose call assistant</string>
+ <!-- Summary for the label of a setting to select the SIM call managers to use.-->
+ <string name="wifi_calling_select_call_assistant_summary">Choose an app or service to manage the networks used for calls</string>
<!-- Summary for the label of a switch setting to enable/disable the use of SIM call managers. -->
<string name="wifi_calling_use_call_assistant_summary">Let apps or services manage networks used for calls</string>
+ <!-- Label for setting to configure the selected call assistant. -->
+ <string name="wifi_calling_call_assistant_configure">Configure</string>
+ <!-- Label for setting to configure the seelcted call assistnant when no call assistant is chosen. -->
+ <string name="wifi_calling_call_assistant_configure_no_selection">Call assistant off</string>
<!-- Built-in label for the default connection service setting. -->
<string name="connection_service_default_label">Built-in connection service</string>
@@ -156,6 +174,8 @@
<string name="networks">Network operators</string>
<!-- Cell Broadcast settings title. [CHAR LIMIT=50] -->
<string name="cell_broadcast_settings">Emergency broadcasts</string>
+ <!-- Phone account settings screen title -->
+ <string name="phone_account_settings">Phone account settings</string>
<!-- Call settings screen title -->
<string name="call_settings">Call Settings</string>
<!-- GSM Call settings screen, setting option name -->
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index 245e97f..9daf7c4 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -1573,7 +1573,6 @@
TelecomManager telecomManager = TelecomManager.from(this);
int allPhoneAccountsCount = telecomManager.getAllPhoneAccountsCount();
- allPhoneAccountsCount = 2;
// Show the phone accounts preference if there are is more than one phone account
if (allPhoneAccountsCount > 1) {
populateDefaultOutgoingAccountsModel();
diff --git a/src/com/android/services/telephony/CdmaConference.java b/src/com/android/services/telephony/CdmaConference.java
index 0ede5d5..e0fa41a 100644
--- a/src/com/android/services/telephony/CdmaConference.java
+++ b/src/com/android/services/telephony/CdmaConference.java
@@ -90,6 +90,26 @@
}
@Override
+ public void onPlayDtmfTone(char c) {
+ final CdmaConnection connection = getFirstConnection();
+ if (connection != null) {
+ connection.onPlayDtmfTone(c);
+ } else {
+ Log.w(this, "No CDMA connection found while trying to play dtmf tone.");
+ }
+ }
+
+ @Override
+ public void onStopDtmfTone() {
+ final CdmaConnection connection = getFirstConnection();
+ if (connection != null) {
+ connection.onStopDtmfTone();
+ } else {
+ Log.w(this, "No CDMA connection found while trying to stop dtmf tone.");
+ }
+ }
+
+ @Override
public void onSwap() {
Log.i(this, "Swapping CDMA conference call.");
sendFlash();
@@ -139,4 +159,12 @@
return null;
}
}
+
+ private CdmaConnection getFirstConnection() {
+ final List<Connection> connections = getConnections();
+ if (connections.isEmpty()) {
+ return null;
+ }
+ return (CdmaConnection) connections.get(0);
+ }
}
diff --git a/src/com/android/services/telephony/DisconnectCauseUtil.java b/src/com/android/services/telephony/DisconnectCauseUtil.java
index 7b56902..8af6849 100644
--- a/src/com/android/services/telephony/DisconnectCauseUtil.java
+++ b/src/com/android/services/telephony/DisconnectCauseUtil.java
@@ -53,7 +53,7 @@
toTelecomDisconnectCauseCode(telephonyDisconnectCause),
toTelecomDisconnectCauseLabel(context, telephonyDisconnectCause),
toTelecomDisconnectCauseDescription(context, telephonyDisconnectCause),
- reason,
+ toTelecomDisconnectReason(telephonyDisconnectCause, reason),
toTelecomDisconnectCauseTone(telephonyDisconnectCause));
}
@@ -296,6 +296,15 @@
return resourceId == null ? "" : context.getResources().getString(resourceId);
}
+ private static String toTelecomDisconnectReason(int telephonyDisconnectCause, String reason) {
+ String causeAsString = android.telephony.DisconnectCause.toString(telephonyDisconnectCause);
+ if (reason == null) {
+ return causeAsString;
+ } else {
+ return reason + ", " + causeAsString;
+ }
+ }
+
/**
* Returns the tone to play for the disconnect cause, or UNKNOWN if none should be played.
*/
diff --git a/src/com/android/services/telephony/GsmConference.java b/src/com/android/services/telephony/GsmConference.java
index 81e0fcb..70fd87b 100644
--- a/src/com/android/services/telephony/GsmConference.java
+++ b/src/com/android/services/telephony/GsmConference.java
@@ -81,11 +81,10 @@
*/
@Override
public void onHold() {
- List<Connection> connections = getConnections();
- if (connections.isEmpty()) {
- return;
+ final GsmConnection connection = getFirstConnection();
+ if (connection != null) {
+ connection.performHold();
}
- ((GsmConnection) connections.get(0)).performHold();
}
/**
@@ -93,11 +92,26 @@
*/
@Override
public void onUnhold() {
- List<Connection> connections = getConnections();
- if (connections.isEmpty()) {
- return;
+ final GsmConnection connection = getFirstConnection();
+ if (connection != null) {
+ connection.performUnhold();
}
- ((GsmConnection) connections.get(0)).performUnhold();
+ }
+
+ @Override
+ public void onPlayDtmfTone(char c) {
+ final GsmConnection connection = getFirstConnection();
+ if (connection != null) {
+ connection.onPlayDtmfTone(c);
+ }
+ }
+
+ @Override
+ public void onStopDtmfTone() {
+ final GsmConnection connection = getFirstConnection();
+ if (connection != null) {
+ connection.onStopDtmfTone();
+ }
}
private Call getMultipartyCallForConnection(Connection connection, String tag) {
@@ -122,4 +136,12 @@
return null;
}
}
+
+ private GsmConnection getFirstConnection() {
+ final List<Connection> connections = getConnections();
+ if (connections.isEmpty()) {
+ return null;
+ }
+ return (GsmConnection) connections.get(0);
+ }
}