Return-Path: From: To: Date: Wed, 7 Jul 2010 14:45:42 +0200 Subject: [PATCH] Added empty VCARD N: parameter handling Message-ID: <090FE800A758CA439B2752C082AC3DEF037828C920@NOK-EUMSG-06.mgdnok.nokia.com> Content-Type: multipart/mixed; boundary="_002_090FE800A758CA439B2752C082AC3DEF037828C920NOKEUMSG06mgd_" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: --_002_090FE800A758CA439B2752C082AC3DEF037828C920NOKEUMSG06mgd_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Some of the devices are expecting that N: parameter in VCARD is always fill= ed (by example Nokia BH-903) When this field is empty (N:;;;;) then list of dialed/incoming calls on car= kit is useless - carkit then shows only blank lines and it's impossible to = determine who made call ( phone number are invisible too in this case) =20 If none of the contact fields is available, then setting telephone number a= s the first attribute for "N:" parameter. Carkit will see that number as contact name - it is only used in case when = none of more detailed contact information is available on the phone. BR, Radek --_002_090FE800A758CA439B2752C082AC3DEF037828C920NOKEUMSG06mgd_ Content-Type: text/x-patch; name="0001-Added-empty-N-parameter-handling-in-VCARD.patch" Content-Description: 0001-Added-empty-N-parameter-handling-in-VCARD.patch Content-Disposition: attachment; filename="0001-Added-empty-N-parameter-handling-in-VCARD.patch"; size=1946; creation-date="Wed, 07 Jul 2010 14:39:17 GMT"; modification-date="Wed, 07 Jul 2010 14:39:17 GMT" Content-Transfer-Encoding: base64 RnJvbSA2ZDg4ZTNkN2MxYTUwMTRlNjBjYThmNTNmNzE2M2UzYTUxMTQ4NTMwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBSYWRvc2xhdyBKYWJsb25za2kgPGV4dC1qYWJsb25za2kucmFk b3NsYXdAbm9raWEuY29tPgpEYXRlOiBXZWQsIDcgSnVsIDIwMTAgMTU6MDc6NTggKzAzMDAKU3Vi amVjdDogW1BBVENIXSBBZGRlZCBlbXB0eSBOOiBwYXJhbWV0ZXIgaGFuZGxpbmcgaW4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