1
0
mirror of https://github.com/nerzhul/ownCloud-SMS-App.git synced 2026-08-24 22:55:37 +00:00

Another massive sync performance improvement.

* Check mailbox validity before cursor iterations, 3 tests * msgNumber removed
* Build messageIDs string only for current checked mailbox
* Don't call push HTTP method if there is no messages to sync
This commit is contained in:
Loïc Blot (@U-Exp)
2014-12-02 20:27:54 +01:00
parent deaf93ff8a
commit 9093f69a57
3 changed files with 61 additions and 79 deletions
@@ -42,6 +42,13 @@ public class SmsDataProvider extends ContentProvider {
null, null, null
);
}
public Cursor query(String mailBox, String condition) {
return query(Uri.parse(mailBox),
new String[] { "read", "date", "address", "seen", "body", "_id", "type", },
condition, null, null
);
}
@Override
public Cursor query(Uri uri, String[] projection, String selection,
@@ -52,6 +59,8 @@ public class SmsDataProvider extends ContentProvider {
return null;
}
@Override
public String getType(Uri uri) {