summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPradeep Panigrahi <pradeepp@codeaurora.org>2014-03-26 10:28:03 +0530
committerSteve Kondik <shade@chemlab.org>2014-06-05 12:29:05 -0700
commit38c152f9eda6b2854a638d2d754db79f775fbc83 (patch)
tree446237bad057ed40631ddb9f2d46304ca2d464d2
parentdce19cdaf4bbdcc2f79843b8581bbf8a88cee290 (diff)
downloadandroid_packages_apps_Bluetooth-38c152f9eda6b2854a638d2d754db79f775fbc83.tar.gz
android_packages_apps_Bluetooth-38c152f9eda6b2854a638d2d754db79f775fbc83.tar.bz2
android_packages_apps_Bluetooth-38c152f9eda6b2854a638d2d754db79f775fbc83.zip
Bluetooth: Map: Add support to add CC list recipients in get Message
As per the present map profile email implementation cc list is not displayed in getMessage response. Add support to send recipients in cc list of email on getMessage response Change-Id: If09a245f18f3727ec678308a46d0a43cd2abf0bf CRs-fixed: 635778
-rw-r--r--src/com/android/bluetooth/map/BluetoothMapContent.java55
1 files changed, 52 insertions, 3 deletions
diff --git a/src/com/android/bluetooth/map/BluetoothMapContent.java b/src/com/android/bluetooth/map/BluetoothMapContent.java
index 341889443..c9257faca 100644
--- a/src/com/android/bluetooth/map/BluetoothMapContent.java
+++ b/src/com/android/bluetooth/map/BluetoothMapContent.java
@@ -732,7 +732,7 @@ public class BluetoothMapContent {
e.setRecipientAddressing(recepientAddrStr[0].trim()); }
} else {
if (D) Log.d(TAG, "setRecipientAddressing: " + address);
- e.setRecipientAddressing(address.trim());
+ e.setRecipientAddressing(address);
}
return;
}
@@ -1792,7 +1792,7 @@ public class BluetoothMapContent {
message.addTo(multiRecepients.trim(), multiRecepients.trim());
}
} else if(recipientName.contains(",")){
- multiRecepients = recipientName.replace(',', ';');
+ multiRecepients = recipientName.replace(", \"", "; \"");
if(multiRecepients != null){
if (V){
Log.v(TAG, "Setting ::Recepient name :: " + multiRecepients.trim());
@@ -1810,7 +1810,56 @@ public class BluetoothMapContent {
message.addTo(null, recipientName.trim());
}
}
- }
+
+ recipientName = null;
+ multiRecepients = null;
+ if((recipientName = c.getString(c.getColumnIndex(MessageColumns.CC_LIST))) != null){
+ if(V) Log.v(TAG, " recipientName " + recipientName);
+ if(recipientName.contains("^B")){
+ String[] recepientStr = recipientName.split("^B");
+ if(recepientStr !=null && recepientStr.length > 0){
+ if (V){
+ Log.v(TAG, " recepientStr[1] " + recepientStr[1].trim());
+ Log.v(TAG, " recepientStr[0] " + recepientStr[0].trim());
+ }
+ } else if(recipientName.contains("")){
+ multiRecepients = recipientName.replace('', ';');
+ setVCardFromEmailAddress(message, recepientStr[1].trim(), false);
+ message.addCc(recepientStr[1].trim(), recepientStr[0].trim());
+ }
+ if(multiRecepients != null){
+ if (V){
+ Log.v(TAG, " Setting ::Recepient name :: " + multiRecepients.trim());
+ }
+ emailId = new StringTokenizer(multiRecepients.trim(),";");
+ do {
+ setVCardFromEmailAddress(message, emailId.nextElement().toString(), false);
+ } while(emailId.hasMoreElements());
+
+ message.addCc(multiRecepients.trim(), multiRecepients.trim());
+ }
+ } else if(recipientName.contains(",")){
+ multiRecepients = recipientName.replace(", \"", "; \"");
+if(V) Log.v(TAG, " After replacing " + multiRecepients);
+
+ if(multiRecepients != null){
+ if (V){
+ Log.v(TAG, "Setting ::Recepient name :: " + multiRecepients.trim());
+ }
+ emailId = new StringTokenizer(multiRecepients.trim(),";");
+ do {
+ tempEmail = emailId.nextElement().toString();
+ setVCardFromEmailAddress(message, tempEmail, false);
+ message.addCc(null, tempEmail);
+ } while(emailId.hasMoreElements());
+ }
+ } else {
+ Log.v(TAG, " Setting ::Recepient name :: " + recipientName.trim());
+ setVCardFromEmailAddress(message, recipientName.trim(), false);
+ message.addCc(null, recipientName.trim());
+ }
+ }
+ }
}
/**