From 6a2c791a2595abed360026a4b2fdbfa1a0f9e9cc Mon Sep 17 00:00:00 2001 From: Jimmy Huang Date: Thu, 23 Oct 2014 12:42:40 -0700 Subject: [PATCH] Fix TC-1905 - Call type not shown in call history 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 --- packaging/phoned.changes | 3 +++ src/obex.cpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/packaging/phoned.changes b/packaging/phoned.changes index 584dd2c..9b15b4e 100644 --- a/packaging/phoned.changes +++ b/packaging/phoned.changes @@ -1,3 +1,6 @@ +* Thu Oct 23 2014 Jimmy Huang accepted/tizen/ivi/20140926.101841-1-ga969171 +- Fix TC-1905 - Call type not shown in call history + * Wed Sep 24 2014 Jimmy Huang accepted/tizen/ivi/20140915.195444-2-g72610ba - Launch lemolo dialer to handle incoming calls diff --git a/src/obex.cpp b/src/obex.cpp index cab83b7..b1755b1 100644 --- a/src/obex.cpp +++ b/src/obex.cpp @@ -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); -- 2.7.4