Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11eff466 authored by Marie Janssen's avatar Marie Janssen Committed by android-build-merger
Browse files

Merge "style: Remove commented-out code"

am: 544c68dc

Change-Id: I14495341a2b0cf306ed4e1e3872d6060c596addc
parents 852cbd41 544c68dc
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ public class BluetoothMapObexServer extends ServerRequestHandler {
    }

    /**
     * Add
     * Add base (Inbox/Outbox/Sent/Deleted)
     * @param root
     */
    private void addBaseFolders(BluetoothMapFolderElement root) {
@@ -219,7 +219,7 @@ public class BluetoothMapObexServer extends ServerRequestHandler {
    }

    /**
     * Add
     * Add SMS / MMS Base folders
     * @param root
     */
    private void addSmsMmsFolders(BluetoothMapFolderElement root) {
@@ -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);
+12 −15
Original line number Diff line number Diff line
@@ -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: "
@@ -224,7 +222,6 @@ public class BluetoothPbapService extends Service {
                parseIntent(intent);
            }
        }
        //}
        return START_NOT_STICKY;
    }

+0 −11
Original line number Diff line number Diff line
@@ -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);
    }

@@ -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;
+1 −10
Original line number Diff line number Diff line
@@ -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 {
@@ -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()) {
@@ -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);
@@ -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);
@@ -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);
+0 −4
Original line number Diff line number Diff line
@@ -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