Loading src/com/android/bluetooth/map/BluetoothMapContent.java +13 −2 Original line number Diff line number Diff line Loading @@ -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"); Loading @@ -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; } Loading src/com/android/bluetooth/map/BluetoothMapContentObserver.java +6 −8 Original line number Diff line number Diff line Loading @@ -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); } Loading Loading @@ -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. */ Loading src/com/android/bluetooth/map/BluetoothMapObexServer.java +0 −19 Original line number Diff line number Diff line Loading @@ -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) { Loading src/com/android/bluetooth/map/BluetoothMapService.java +0 −21 Original line number Diff line number Diff line Loading @@ -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); } } } src/com/android/bluetooth/map/BluetoothMapSmsPdu.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; Loading Loading
src/com/android/bluetooth/map/BluetoothMapContent.java +13 −2 Original line number Diff line number Diff line Loading @@ -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"); Loading @@ -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; } Loading
src/com/android/bluetooth/map/BluetoothMapContentObserver.java +6 −8 Original line number Diff line number Diff line Loading @@ -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); } Loading Loading @@ -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. */ Loading
src/com/android/bluetooth/map/BluetoothMapObexServer.java +0 −19 Original line number Diff line number Diff line Loading @@ -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) { Loading
src/com/android/bluetooth/map/BluetoothMapService.java +0 −21 Original line number Diff line number Diff line Loading @@ -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); } } }
src/com/android/bluetooth/map/BluetoothMapSmsPdu.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; Loading