Loading src/com/android/bluetooth/map/BluetoothMapContent.java +42 −12 Original line number Diff line number Diff line Loading @@ -929,6 +929,10 @@ public class BluetoothMapContent { } } if( name ==null) { //set empty value name = ""; } if (D) Log.d(TAG, "setSenderName: " + name); e.setSenderName(name); } Loading Loading @@ -2213,7 +2217,16 @@ public class BluetoothMapContent { fi.msgType = FilterInfo.TYPE_EMAIL; String where = setWhereFilter(folder, fi, ap); Log.d(TAG, "where clause is = " + where); where+= " AND "+ Message.FLAG_LOADED_SELECTION; 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 @@ -2239,7 +2252,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 Loading @@ -2325,10 +2339,18 @@ public class BluetoothMapContent { fi.msgType = FilterInfo.TYPE_SMS; if(ap.getFilterPriority() != 1){ /*SMS cannot have high priority*/ String where = setWhereFilter(folder, fi, ap); Cursor c = mResolver.query(Sms.CONTENT_URI, SMS_PROJECTION, where, null, "date DESC"); Cursor c =null; //Fetch only maxListCount messages from startOffset if(ap.getStartOffset() > 0 && ap.getStartOffset() < 65536) { c = mResolver.query(Sms.CONTENT_URI, SMS_PROJECTION, where, null, "date DESC" + " limit " + ap.getMaxListCount()+" offset "+ ap.getStartOffset()); }else { c = mResolver.query(Sms.CONTENT_URI, SMS_PROJECTION, where, null, "date DESC" + " limit " + ap.getMaxListCount()); } if (V) Log.d(TAG, "where clause is = " + where); if (c != null) { while (c.moveToNext()) { if (matchAddresses(c, fi, ap)) { Loading @@ -2344,12 +2366,20 @@ public class BluetoothMapContent { if (mmsSelected(fi, ap)) { fi.msgType = FilterInfo.TYPE_MMS; String where = setWhereFilter(folder, fi, ap); where += " AND " + INTERESTED_MESSAGE_TYPE_CLAUSE; Cursor c = mResolver.query(Mms.CONTENT_URI, MMS_PROJECTION, where, null, "date DESC"); Cursor c =null; //Fetch only maxListCount messages from startOffset if(ap.getStartOffset() > 0 && ap.getStartOffset() < 65536) { c = mResolver.query(Mms.CONTENT_URI, MMS_PROJECTION, where, null, "date DESC" + " limit " + ap.getMaxListCount()+" offset "+ ap.getStartOffset()); } else { c = mResolver.query(Mms.CONTENT_URI, MMS_PROJECTION, where, null, "date DESC" + " limit " + ap.getMaxListCount()); } if (V) Log.d(TAG, "where clause is = " + where); if (c != null) { int cnt = 0; while (c.moveToNext()) { Loading @@ -2362,10 +2392,10 @@ public class BluetoothMapContent { c.close(); } } /* 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/BluetoothMapMessageListingElement.java +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public class BluetoothMapMessageListingElement */ this.senderAddressing = PhoneNumberUtils.extractNetworkPortion(senderAddressing); if(this.senderAddressing == null || this.senderAddressing.length() < 2){ this.senderAddressing = "11"; // Ensure we have at least two digits to this.senderAddressing = ""; // Set empty value } } Loading Loading
src/com/android/bluetooth/map/BluetoothMapContent.java +42 −12 Original line number Diff line number Diff line Loading @@ -929,6 +929,10 @@ public class BluetoothMapContent { } } if( name ==null) { //set empty value name = ""; } if (D) Log.d(TAG, "setSenderName: " + name); e.setSenderName(name); } Loading Loading @@ -2213,7 +2217,16 @@ public class BluetoothMapContent { fi.msgType = FilterInfo.TYPE_EMAIL; String where = setWhereFilter(folder, fi, ap); Log.d(TAG, "where clause is = " + where); where+= " AND "+ Message.FLAG_LOADED_SELECTION; 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 @@ -2239,7 +2252,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 Loading @@ -2325,10 +2339,18 @@ public class BluetoothMapContent { fi.msgType = FilterInfo.TYPE_SMS; if(ap.getFilterPriority() != 1){ /*SMS cannot have high priority*/ String where = setWhereFilter(folder, fi, ap); Cursor c = mResolver.query(Sms.CONTENT_URI, SMS_PROJECTION, where, null, "date DESC"); Cursor c =null; //Fetch only maxListCount messages from startOffset if(ap.getStartOffset() > 0 && ap.getStartOffset() < 65536) { c = mResolver.query(Sms.CONTENT_URI, SMS_PROJECTION, where, null, "date DESC" + " limit " + ap.getMaxListCount()+" offset "+ ap.getStartOffset()); }else { c = mResolver.query(Sms.CONTENT_URI, SMS_PROJECTION, where, null, "date DESC" + " limit " + ap.getMaxListCount()); } if (V) Log.d(TAG, "where clause is = " + where); if (c != null) { while (c.moveToNext()) { if (matchAddresses(c, fi, ap)) { Loading @@ -2344,12 +2366,20 @@ public class BluetoothMapContent { if (mmsSelected(fi, ap)) { fi.msgType = FilterInfo.TYPE_MMS; String where = setWhereFilter(folder, fi, ap); where += " AND " + INTERESTED_MESSAGE_TYPE_CLAUSE; Cursor c = mResolver.query(Mms.CONTENT_URI, MMS_PROJECTION, where, null, "date DESC"); Cursor c =null; //Fetch only maxListCount messages from startOffset if(ap.getStartOffset() > 0 && ap.getStartOffset() < 65536) { c = mResolver.query(Mms.CONTENT_URI, MMS_PROJECTION, where, null, "date DESC" + " limit " + ap.getMaxListCount()+" offset "+ ap.getStartOffset()); } else { c = mResolver.query(Mms.CONTENT_URI, MMS_PROJECTION, where, null, "date DESC" + " limit " + ap.getMaxListCount()); } if (V) Log.d(TAG, "where clause is = " + where); if (c != null) { int cnt = 0; while (c.moveToNext()) { Loading @@ -2362,10 +2392,10 @@ public class BluetoothMapContent { c.close(); } } /* 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/BluetoothMapMessageListingElement.java +1 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public class BluetoothMapMessageListingElement */ this.senderAddressing = PhoneNumberUtils.extractNetworkPortion(senderAddressing); if(this.senderAddressing == null || this.senderAddressing.length() < 2){ this.senderAddressing = "11"; // Ensure we have at least two digits to this.senderAddressing = ""; // Set empty value } } Loading