1
0
mirror of https://github.com/nerzhul/ownCloud-SMS-App.git synced 2026-08-23 06:13:04 +00:00

Coding style + removal some class copy

This commit is contained in:
Loic Blot
2015-11-17 21:04:02 +01:00
parent ac239f1f71
commit 22f0790f2e
6 changed files with 53 additions and 51 deletions
@@ -166,10 +166,10 @@ public class MainActivity extends Activity {
if (cMon.isValid()) {
// Now fetch messages since last stored date
JSONArray smsList = new SmsFetcher(ctx)
.bufferMessagesSinceDate((long) 0);
JSONArray smsList = new JSONArray();
new SmsFetcher(ctx).bufferMessagesSinceDate(smsList, (long) 0);
if (smsList != null) {
if (smsList.length() > 0) {
OCSMSNotificationManager nMgr = new OCSMSNotificationManager(ctx);
nMgr.setSyncProcessMsg();
new SyncTask(getApplicationContext(), smsList).execute();
@@ -119,10 +119,11 @@ public class ContactListActivity extends Activity implements ASyncContactLoad {
null,
ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = ?",
new String[]{contactId}, null);
while ((phones != null) && phones.moveToNext()) {
String phoneNumber = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER))
.replaceAll(" ", "");
r.add(phoneNumber);
r.add(phones.getString(phones.getColumnIndex(
ContactsContract.CommonDataKinds.Phone.NUMBER))
.replaceAll(" ", ""));
}
if (phones != null) {