aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-12-13 22:17:27 +0100
committeriNPUTmice <daniel@gultsch.de>2014-12-13 22:17:27 +0100
commitfc293aaede58028c73ab7f69f07c991797442f07 (patch)
tree71d0bec8893537d04c05ce3890e5c0c6134a7c96 /src
parent6148f04d7b3903a956ebb8f43b612438b6424d57 (diff)
avoiding concurrent modification
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java4
-rw-r--r--src/main/java/eu/siacs/conversations/utils/PhoneHelper.java5
2 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 43e4a377..048904a9 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -383,7 +383,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
public int onStartCommand(Intent intent, int flags, int startId) {
if (intent != null && intent.getAction() != null) {
if (intent.getAction().equals(ACTION_MERGE_PHONE_CONTACTS)) {
- PhoneHelper.loadPhoneContacts(getApplicationContext(), this);
+ PhoneHelper.loadPhoneContacts(getApplicationContext(), new ArrayList<Bundle>(), this);
return START_STICKY;
} else if (intent.getAction().equals(Intent.ACTION_SHUTDOWN)) {
logoutAndSave();
@@ -495,7 +495,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
this.databaseBackend.readRoster(account.getRoster());
}
initConversations();
- PhoneHelper.loadPhoneContacts(getApplicationContext(),this);
+ PhoneHelper.loadPhoneContacts(getApplicationContext(),new ArrayList<Bundle>(), this);
getContentResolver().registerContentObserver(ContactsContract.Contacts.CONTENT_URI, true, contactObserver);
this.fileObserver.startWatching();
diff --git a/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java b/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
index 87973159..9a5cbaaf 100644
--- a/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
@@ -16,10 +16,7 @@ import android.provider.ContactsContract.Profile;
public class PhoneHelper {
- public static void loadPhoneContacts(Context context,
- final OnPhoneContactsLoadedListener listener) {
- final List<Bundle> phoneContacts = new ArrayList<Bundle>();
-
+ public static void loadPhoneContacts(Context context,final List<Bundle> phoneContacts, final OnPhoneContactsLoadedListener listener) {
final String[] PROJECTION = new String[] { ContactsContract.Data._ID,
ContactsContract.Data.DISPLAY_NAME,
ContactsContract.Data.PHOTO_URI,