Correct Status.statusOnline() method. Extended away is online.
--- a/src/com/beem/project/beem/service/RosterAdapter.java Thu May 27 01:27:29 2010 +0200
+++ b/src/com/beem/project/beem/service/RosterAdapter.java Thu May 27 01:37:12 2010 +0200
@@ -335,7 +335,6 @@
*/
@Override
public void entriesDeleted(Collection<String> addresses) {
- Log.i(TAG, "Suppression de l'entry");
final int n = mRemoteRosListeners.beginBroadcast();
List<String> tab = new ArrayList<String>();
@@ -377,14 +376,13 @@
@Override
public void presenceChanged(Presence presence) {
final int n = mRemoteRosListeners.beginBroadcast();
+ Log.v(TAG, ">>> Presence changed for " + presence.getFrom());
for (int i = 0; i < n; i++) {
IBeemRosterListener listener = mRemoteRosListeners.getBroadcastItem(i);
try {
- Log.d(TAG, ">>> Presence changed.");
if (presence.getStatus() == null || "".equals(presence.getStatus())) {
presence.setStatus(mDefaultStatusMessages.get(Status.getStatusFromPresence(presence)));
- Log.d(TAG, ">>> Default status added.");
}
listener.onPresenceChanged(new PresenceAdapter(presence));
} catch (RemoteException e) {
--- a/src/com/beem/project/beem/utils/Status.java Thu May 27 01:27:29 2010 +0200
+++ b/src/com/beem/project/beem/utils/Status.java Thu May 27 01:37:12 2010 +0200
@@ -147,10 +147,10 @@
/**
* Check if contact is online by his status.
* @param status contact status
- * @return is obline
+ * @return is online
*/
public static boolean statusOnline(final int status) {
- return status != Status.CONTACT_STATUS_DISCONNECT && status != Status.CONTACT_STATUS_UNAVAILABLE;
+ return status != Status.CONTACT_STATUS_DISCONNECT;
}
}