OSDN Git Service

Don't send default phone number for 0.vcf card.
authorJaikumar Ganesh <jaikumar@google.com>
Fri, 13 Nov 2009 18:41:23 +0000 (10:41 -0800)
committerJaikumar Ganesh <jaikumar@google.com>
Fri, 13 Nov 2009 18:58:08 +0000 (10:58 -0800)
This prevents an entry "My name" with "000000" in the car kit contacts.
We now send only the name and the version in the vcf.
Ideally, we could like to send an empty vcard, but we would need to test
with various car kits with that works well.

Original Change by: Lixin Yue
Bug: 2247067
Dr No: Eastham

src/com/android/bluetooth/pbap/BluetoothPbapService.java

index 5842394..26ac61a 100644 (file)
@@ -421,10 +421,6 @@ public class BluetoothPbapService extends Service {
         TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
         if (tm != null) {
             sLocalPhoneNum = tm.getLine1Number();
-            if (TextUtils.isEmpty(sLocalPhoneNum)) {
-                // Default number (000000) should be ok
-                sLocalPhoneNum = this.getString(R.string.defaultnumber);
-            }
             sLocalPhoneName = tm.getLine1AlphaTag();
             if (TextUtils.isEmpty(sLocalPhoneName)) {
                 sLocalPhoneName = this.getString(R.string.localPhoneName);