Loading src/com/android/bluetooth/map/BluetoothMapObexServer.java +6 −7 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ public class BluetoothMapObexServer extends ServerRequestHandler { } /** * Add * Add base (Inbox/Outbox/Sent/Deleted) * @param root */ private void addBaseFolders(BluetoothMapFolderElement root) { Loading @@ -219,7 +219,7 @@ public class BluetoothMapObexServer extends ServerRequestHandler { } /** * Add * Add SMS / MMS Base folders * @param root */ private void addSmsMmsFolders(BluetoothMapFolderElement root) { Loading Loading @@ -1209,7 +1209,6 @@ public class BluetoothMapObexServer extends ServerRequestHandler { outAppParams.setConvoListingSize(outList.getCount()); // Generate the byte stream outBytes = outList.encode(); // Include thread ID for clients that supports it. // hasUnread = outList.hasUnread(); if(D) Log.d(TAG, "outBytes size:"+ outBytes.length); } else { outList = mOutContent.convoListing(appParams, true); Loading src/com/android/bluetooth/pbap/BluetoothPbapService.java +12 −15 Original line number Diff line number Diff line Loading @@ -209,8 +209,6 @@ public class BluetoothPbapService extends Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { //int retCode = super.onStartCommand(intent, flags, startId); //if (retCode == START_STICKY) { mStartId = startId; if (mAdapter == null) { Log.w(TAG, "Stopping BluetoothPbapService: " Loading @@ -224,7 +222,6 @@ public class BluetoothPbapService extends Service { parseIntent(intent); } } //} return START_NOT_STICKY; } Loading src/com/android/bluetooth/pbap/BluetoothPbapUtils.java +0 −11 Original line number Diff line number Diff line Loading @@ -98,21 +98,12 @@ public class BluetoothPbapUtils { public static VCardComposer createFilteredVCardComposer(final Context ctx, final int vcardType, final byte[] filter) { int vType = vcardType; /* boolean isNameNumberOnly = isNameAndNumberOnly(filter); if (isNameNumberOnly) { if (V) Log.v(TAG, "Creating Name/Number only VCardComposer..."); vType |= VCardConfig.FLAG_NAME_NUMBER_ONLY_EXPORT; } else { */ boolean includePhoto = BluetoothPbapConfig.includePhotosInVcard() && (!hasFilter(filter) || isFilterBitSet(filter, FILTER_PHOTO)); if (!includePhoto) { if (V) Log.v(TAG, "Excluding images from VCardComposer..."); vType |= VCardConfig.FLAG_REFRAIN_IMAGE_EXPORT; } //} return new VCardComposer(ctx, vType, true); } Loading Loading @@ -172,8 +163,6 @@ public class BluetoothPbapUtils { } public static boolean createProfileVCardFile(File file, Context context) { // File defaultFile = new // File(OppApplicationConfig.OPP_OWNER_VCARD_PATH); FileInputStream is = null; FileOutputStream os = null; boolean success = true; Loading tests/src/com/android/bluetooth/tests/BluetoothMapContentTest.java +1 −10 Original line number Diff line number Diff line Loading @@ -518,10 +518,8 @@ public class BluetoothMapContentTest extends AndroidTestCase { BluetoothMapFolderElement fe = getInbox(); if (fe != null) { String where =""; //where = BluetoothMapContract.MessageColumns.FOLDER_ID + " = " + fe.getEmailFolderId(); Cursor c = mResolver.query(mEmailMessagesUri, BT_MESSAGE_PROJECTION, where, null, "_id DESC"); "", null, "_id DESC"); if (c != null) { dumpCursor(c); } else { Loading @@ -537,9 +535,6 @@ public class BluetoothMapContentTest extends AndroidTestCase { initTestSetup(); Log.d(TAG, "**** testDumpMessageContent **** from: " + mEmailMessagesUri.toString()); // BluetoothMapFolderElement fe = getInbox(); // String where = BluetoothMapContract.MessageColumns.FOLDER_ID + " = " + fe.getEmailFolderId(); // where += " AND " + BluetoothMapContract.MessageColumns.FLAG_HIGH_PRIORITY + " = 0"; Cursor c = mResolver.query(mEmailMessagesUri, BT_MESSAGE_PROJECTION, null, null, "_id DESC"); if (c != null && c.moveToNext()) { Loading @@ -555,7 +550,6 @@ public class BluetoothMapContentTest extends AndroidTestCase { Log.d(TAG, "**** testWriteMessageContent **** from: " + mEmailMessagesUri.toString()); BluetoothMapFolderElement fe = getInbox(); String where = BluetoothMapContract.MessageColumns.FOLDER_ID + " = " + fe.getFolderId(); // where += " AND " + BluetoothMapContract.MessageColumns.HIGH_PRIORITY + " = 0"; Cursor c = mResolver.query(mEmailMessagesUri, BT_MESSAGE_PROJECTION, where, null, "_id DESC"); if (c != null) { writeMessage(c); Loading Loading @@ -649,8 +643,6 @@ public class BluetoothMapContentTest extends AndroidTestCase { long date = System.currentTimeMillis(); Log.i(TAG, "Preparing messages..."); for (int x=0;x<count;x++){ //if (D) Log.d(TAG, "*** Adding dummy sms #"+x); ContentValues item = new ContentValues(4); item.put("address", "1234"); item.put("body", "test message "+x); Loading @@ -658,7 +650,6 @@ public class BluetoothMapContentTest extends AndroidTestCase { item.put("read", "0"); values[x] = item; // Uri mUri = mResolver.insert(Uri.parse("content://sms"), item); } Log.i(TAG, "Starting bulk insert..."); mResolver.bulkInsert(Uri.parse("content://sms"), values); Loading tests/src/com/android/bluetooth/tests/BluetoothMapbMessageTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -206,13 +206,9 @@ public class BluetoothMapbMessageTest extends AndroidTestCase { msg.setType(TYPE.SMS_GSM); try { byte[] encodedBytes = msg.encode(); // InputStream is = new ByteArrayInputStream(encodedBytes); encoded = new String(encodedBytes); // BluetoothMapbMessage newMsg = BluetoothMapbMessage.parse(is, BluetoothMapAppParams.CHARSET_NATIVE); // String decoded = ((BluetoothMapbMessageSms) newMsg).getSmsBody(); if(D) Log.d(TAG, "\nExpected: \n" + expected); if(D) Log.d(TAG, "\nEncoded: \n" + encoded); // if(D) Log.d(TAG, "\nDecoded: \n" + decoded); assertTrue(expected.equalsIgnoreCase(encoded)); } catch (UnsupportedEncodingException e) { Log.d(TAG, "Encoding failed.",e); Loading Loading
src/com/android/bluetooth/map/BluetoothMapObexServer.java +6 −7 Original line number Diff line number Diff line Loading @@ -208,7 +208,7 @@ public class BluetoothMapObexServer extends ServerRequestHandler { } /** * Add * Add base (Inbox/Outbox/Sent/Deleted) * @param root */ private void addBaseFolders(BluetoothMapFolderElement root) { Loading @@ -219,7 +219,7 @@ public class BluetoothMapObexServer extends ServerRequestHandler { } /** * Add * Add SMS / MMS Base folders * @param root */ private void addSmsMmsFolders(BluetoothMapFolderElement root) { Loading Loading @@ -1209,7 +1209,6 @@ public class BluetoothMapObexServer extends ServerRequestHandler { outAppParams.setConvoListingSize(outList.getCount()); // Generate the byte stream outBytes = outList.encode(); // Include thread ID for clients that supports it. // hasUnread = outList.hasUnread(); if(D) Log.d(TAG, "outBytes size:"+ outBytes.length); } else { outList = mOutContent.convoListing(appParams, true); Loading
src/com/android/bluetooth/pbap/BluetoothPbapService.java +12 −15 Original line number Diff line number Diff line Loading @@ -209,8 +209,6 @@ public class BluetoothPbapService extends Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { //int retCode = super.onStartCommand(intent, flags, startId); //if (retCode == START_STICKY) { mStartId = startId; if (mAdapter == null) { Log.w(TAG, "Stopping BluetoothPbapService: " Loading @@ -224,7 +222,6 @@ public class BluetoothPbapService extends Service { parseIntent(intent); } } //} return START_NOT_STICKY; } Loading
src/com/android/bluetooth/pbap/BluetoothPbapUtils.java +0 −11 Original line number Diff line number Diff line Loading @@ -98,21 +98,12 @@ public class BluetoothPbapUtils { public static VCardComposer createFilteredVCardComposer(final Context ctx, final int vcardType, final byte[] filter) { int vType = vcardType; /* boolean isNameNumberOnly = isNameAndNumberOnly(filter); if (isNameNumberOnly) { if (V) Log.v(TAG, "Creating Name/Number only VCardComposer..."); vType |= VCardConfig.FLAG_NAME_NUMBER_ONLY_EXPORT; } else { */ boolean includePhoto = BluetoothPbapConfig.includePhotosInVcard() && (!hasFilter(filter) || isFilterBitSet(filter, FILTER_PHOTO)); if (!includePhoto) { if (V) Log.v(TAG, "Excluding images from VCardComposer..."); vType |= VCardConfig.FLAG_REFRAIN_IMAGE_EXPORT; } //} return new VCardComposer(ctx, vType, true); } Loading Loading @@ -172,8 +163,6 @@ public class BluetoothPbapUtils { } public static boolean createProfileVCardFile(File file, Context context) { // File defaultFile = new // File(OppApplicationConfig.OPP_OWNER_VCARD_PATH); FileInputStream is = null; FileOutputStream os = null; boolean success = true; Loading
tests/src/com/android/bluetooth/tests/BluetoothMapContentTest.java +1 −10 Original line number Diff line number Diff line Loading @@ -518,10 +518,8 @@ public class BluetoothMapContentTest extends AndroidTestCase { BluetoothMapFolderElement fe = getInbox(); if (fe != null) { String where =""; //where = BluetoothMapContract.MessageColumns.FOLDER_ID + " = " + fe.getEmailFolderId(); Cursor c = mResolver.query(mEmailMessagesUri, BT_MESSAGE_PROJECTION, where, null, "_id DESC"); "", null, "_id DESC"); if (c != null) { dumpCursor(c); } else { Loading @@ -537,9 +535,6 @@ public class BluetoothMapContentTest extends AndroidTestCase { initTestSetup(); Log.d(TAG, "**** testDumpMessageContent **** from: " + mEmailMessagesUri.toString()); // BluetoothMapFolderElement fe = getInbox(); // String where = BluetoothMapContract.MessageColumns.FOLDER_ID + " = " + fe.getEmailFolderId(); // where += " AND " + BluetoothMapContract.MessageColumns.FLAG_HIGH_PRIORITY + " = 0"; Cursor c = mResolver.query(mEmailMessagesUri, BT_MESSAGE_PROJECTION, null, null, "_id DESC"); if (c != null && c.moveToNext()) { Loading @@ -555,7 +550,6 @@ public class BluetoothMapContentTest extends AndroidTestCase { Log.d(TAG, "**** testWriteMessageContent **** from: " + mEmailMessagesUri.toString()); BluetoothMapFolderElement fe = getInbox(); String where = BluetoothMapContract.MessageColumns.FOLDER_ID + " = " + fe.getFolderId(); // where += " AND " + BluetoothMapContract.MessageColumns.HIGH_PRIORITY + " = 0"; Cursor c = mResolver.query(mEmailMessagesUri, BT_MESSAGE_PROJECTION, where, null, "_id DESC"); if (c != null) { writeMessage(c); Loading Loading @@ -649,8 +643,6 @@ public class BluetoothMapContentTest extends AndroidTestCase { long date = System.currentTimeMillis(); Log.i(TAG, "Preparing messages..."); for (int x=0;x<count;x++){ //if (D) Log.d(TAG, "*** Adding dummy sms #"+x); ContentValues item = new ContentValues(4); item.put("address", "1234"); item.put("body", "test message "+x); Loading @@ -658,7 +650,6 @@ public class BluetoothMapContentTest extends AndroidTestCase { item.put("read", "0"); values[x] = item; // Uri mUri = mResolver.insert(Uri.parse("content://sms"), item); } Log.i(TAG, "Starting bulk insert..."); mResolver.bulkInsert(Uri.parse("content://sms"), values); Loading
tests/src/com/android/bluetooth/tests/BluetoothMapbMessageTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -206,13 +206,9 @@ public class BluetoothMapbMessageTest extends AndroidTestCase { msg.setType(TYPE.SMS_GSM); try { byte[] encodedBytes = msg.encode(); // InputStream is = new ByteArrayInputStream(encodedBytes); encoded = new String(encodedBytes); // BluetoothMapbMessage newMsg = BluetoothMapbMessage.parse(is, BluetoothMapAppParams.CHARSET_NATIVE); // String decoded = ((BluetoothMapbMessageSms) newMsg).getSmsBody(); if(D) Log.d(TAG, "\nExpected: \n" + expected); if(D) Log.d(TAG, "\nEncoded: \n" + encoded); // if(D) Log.d(TAG, "\nDecoded: \n" + decoded); assertTrue(expected.equalsIgnoreCase(encoded)); } catch (UnsupportedEncodingException e) { Log.d(TAG, "Encoding failed.",e); Loading