diff options
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 57cb60b9..9a5cbc0c 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -398,7 +398,7 @@ public class XmppConnectionService extends Service { @Override public int onStartCommand(Intent intent, int flags, int startId) { - Log.d(LOGTAG,"calling start service. caller was:"+intent.getAction()); + //Log.d(LOGTAG,"calling start service. caller was:"+intent.getAction()); ConnectivityManager cm = (ConnectivityManager) getApplicationContext() .getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); @@ -670,7 +670,7 @@ public class XmppConnectionService extends Service { return packet; } - public void getRoster(Account account, + private void getRoster(Account account, final OnRosterFetchedListener listener) { List<Contact> contacts = databaseBackend.getContactsByAccount(account); for (int i = 0; i < contacts.size(); ++i) { @@ -680,6 +680,14 @@ public class XmppConnectionService extends Service { listener.onRosterFetched(contacts); } } + + public List<Contact> getRoster(Account account) { + List<Contact> contacts = databaseBackend.getContactsByAccount(account); + for (int i = 0; i < contacts.size(); ++i) { + contacts.get(i).setAccount(account); + } + return contacts; + } public void updateRoster(final Account account, final OnRosterFetchedListener listener) { |