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:
@@ -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();
|
||||
|
||||
+4
-3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user