Fix TC-1905 - Call type not shown in call history 81/29281/1 accepted/tizen/ivi/20141024.005038 submit/tizen_ivi/20141023.205748
authorJimmy Huang <jimmy.huang@intel.com>
Thu, 23 Oct 2014 19:42:40 +0000 (12:42 -0700)
committerJimmy Huang <jimmy.huang@intel.com>
Thu, 23 Oct 2014 19:47:13 +0000 (12:47 -0700)
When pulling vcards through PBAP from certain phones, the format
is not in the expected where it contains a "TYPE=" prefix for
the call direction.  Fixed phoned to handle this special case.

Change-Id: I5af318b94270fb89a2aa539a2a0ac4d7a4729fe7
Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
packaging/phoned.changes
src/obex.cpp

index 584dd2c..9b15b4e 100644 (file)
@@ -1,3 +1,6 @@
+* Thu Oct 23 2014 Jimmy Huang <jimmy.huang@intel.com> accepted/tizen/ivi/20140926.101841-1-ga969171
+- Fix TC-1905 - Call type not shown in call history
+
 * Wed Sep 24 2014 Jimmy Huang <jimmy.huang@intel.com> accepted/tizen/ivi/20140915.195444-2-g72610ba
 - Launch lemolo dialer to handle incoming calls
 
index cab83b7..b1755b1 100644 (file)
@@ -996,6 +996,11 @@ void Obex::processVCards(const char *filePath, const char *type, const char *ori
             }
             else if(line.find("X-IRMC-CALL-DATETIME") == 0) {
                 size_t index1 = line.find( "TYPE=" ) + 5;
+                if (index1 == 4) {
+                    // vcard format doesn't contain "TYPE=" prefix
+                    // use ";" as the index instead
+                    index1 = line.find( ";" ) + 1;
+                }
                 size_t index2 = line.find( ":", index1 ) + 1;
 
                 std::string note = line.substr (index1, index2-index1-1);