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

Commit 490414ca authored by Divya Sharma's avatar Divya Sharma Committed by Sudhir Sharma
Browse files

Compilation fix for bluetooth

Change-Id: I4fb839a8b2c8444ff3c3fcb5b1305ff65b7455f8
parent 9d81dc62
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -2233,7 +2233,17 @@ public class BluetoothMapContent {
            fi.msgType = FilterInfo.TYPE_EMAIL;

            String where = setWhereFilter(folder, fi, ap);
            where+= " AND "+ Message.FLAG_LOADED_SELECTION;
            Log.d(TAG, "where clause is = " + where);
            where+= " order by timeStamp desc ";
           //Fetch only maxListCount emails from  startOffset
           if(ap.getMaxListCount() > 0 && ap.getMaxListCount() < 65536) {
                where+=" LIMIT "+ap.getMaxListCount();
           }
           if(ap.getStartOffset() > 0 && ap.getStartOffset() < 65536) {
                where+=" OFFSET "+ap.getStartOffset();
           }
           if (V) Log.d(TAG, "where clause is = " + where);
           try {
                Cursor c = mResolver.query(uriEmail,
                EMAIL_PROJECTION, where + " AND " + Message.FLAG_LOADED_SELECTION, null, "timeStamp desc");
@@ -2259,7 +2269,8 @@ public class BluetoothMapContent {

        /* Enable this if post sorting and segmenting needed */
        bmList.sort();
        bmList.segment(ap.getMaxListCount(), ap.getStartOffset());
        //Handle OFFSET and MAXLISTCOUNT from DB query
//        bmList.segment(ap.getMaxListCount(), ap.getStartOffset());

        return bmList;
    }
+6 −8
Original line number Diff line number Diff line
@@ -384,7 +384,6 @@ public class BluetoothMapContentObserver {
                    long id = c.getLong(c.getColumnIndex(Sms._ID));
                    int type = c.getInt(c.getColumnIndex(Sms.TYPE));


                    Msg msg = new Msg(id, type);
                    msgListSms.put(id, msg);
                }
@@ -969,7 +968,6 @@ public class BluetoothMapContentObserver {
                    long id = c.getLong(c.getColumnIndex(Mms._ID));
                    int type = c.getInt(c.getColumnIndex(Mms.MESSAGE_BOX));


                    /* We must filter out any actions made by the MCE. Add the new message to
                     * the list of known messages. */

+0 −19
Original line number Diff line number Diff line
@@ -148,25 +148,6 @@ public class BluetoothMapObexServer extends ServerRequestHandler {
        tmpFolder.addFolder("drafts");
    }

    private void addEmailFolders(BluetoothMapFolderElement parentFolder) throws RemoteException {
        // Select all parent folders
        BluetoothMapFolderElement newFolder;

        String where = BluetoothMapContract.FolderColumns.PARENT_FOLDER_ID +
                        " = " + parentFolder.getEmailFolderId();
        Cursor c = mProviderClient.query(mEmailFolderUri,
                        BluetoothMapContract.BT_FOLDER_PROJECTION, where, null, null);
        try {
            while (c != null && c.moveToNext()) {
                String name = c.getString(c.getColumnIndex(BluetoothMapContract.FolderColumns.NAME));
                long id = c.getLong(c.getColumnIndex(BluetoothMapContract.FolderColumns._ID));
                newFolder = parentFolder.addEmailFolder(name, id);
                addEmailFolders(newFolder); // Use recursion to add any sub folders
            }
        } finally {
            if (c != null) c.close();
        }
    }

    @Override
    public int onConnect(final HeaderSet request, HeaderSet reply) {
+0 −21
Original line number Diff line number Diff line
@@ -1206,25 +1206,4 @@ public class BluetoothMapService extends ProfileService {
        }
    };

    @Override
    public void dump(StringBuilder sb) {
        super.dump(sb);
        println(sb, "mRemoteDevice: " + mRemoteDevice);
        println(sb, "sRemoteDeviceName: " + sRemoteDeviceName);
        println(sb, "mState: " + mState);
        println(sb, "mAppObserver: " + mAppObserver);
        println(sb, "mIsWaitingAuthorization: " + mIsWaitingAuthorization);
        println(sb, "mRemoveTimeoutMsg: " + mRemoveTimeoutMsg);
        println(sb, "mPermission: " + mPermission);
        println(sb, "mAccountChanged: " + mAccountChanged);
        println(sb, "mBluetoothMnsObexClient: " + mBluetoothMnsObexClient);
        println(sb, "mMasInstanceMap:");
        for (BluetoothMapEmailSettingsItem key : mMasInstanceMap.keySet()) {
            println(sb, "  " + key + " : " + mMasInstanceMap.get(key));
        }
        println(sb, "mEnabledAccounts:");
        for (BluetoothMapEmailSettingsItem account : mEnabledAccounts) {
            println(sb, "  " + account);
        }
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -471,7 +471,7 @@ public class BluetoothMapSmsPdu {
        int activePhone = TelephonyManager.getDefault().getCurrentPhoneType(); // TODO: Change to use: ((TelephonyManager)myContext.getSystemService(Context.TELEPHONY_SERVICE))
        int phoneType;
        GsmAlphabet.TextEncodingDetails ted = (PHONE_TYPE_CDMA == activePhone) ?
            com.android.internal.telephony.cdma.SmsMessage.calculateLength((CharSequence)messageText, false, true) :
            com.android.internal.telephony.cdma.SmsMessage.calculateLength((CharSequence)messageText, false) :
            com.android.internal.telephony.gsm.SmsMessage.calculateLength((CharSequence)messageText, false);

        SmsPdu newPdu;