Hop petit commit pour que popop puisse debugger.
--- a/res/layout/contactlistcontact.xml Tue Apr 07 01:18:19 2009 +0200
+++ b/res/layout/contactlistcontact.xml Tue Apr 07 12:25:02 2009 +0200
@@ -6,7 +6,7 @@
android:gravity="center_vertical" >
<ImageView android:id="@+id/contactliststatus"
- android:layout_weight="5"
+ android:layout_weight="5"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical" />
--- a/src/com/beem/project/beem/service/Contact.java Tue Apr 07 01:18:19 2009 +0200
+++ b/src/com/beem/project/beem/service/Contact.java Tue Apr 07 12:25:02 2009 +0200
@@ -52,7 +52,8 @@
/**
* Construct a contact from a parcel.
- * @param in parcel to use for construction
+ * @param in
+ * parcel to use for construction
*/
private Contact(final Parcel in) {
mID = in.readInt();
@@ -60,7 +61,7 @@
mJID = in.readString();
mMsgState = in.readString();
mRes = new ArrayList<String>();
- in.readStringList(mRes);
+ in.readStringList(mRes);
}
/**
@@ -93,7 +94,8 @@
/**
* Constructor.
- * @param jid JID of the contact
+ * @param jid
+ * JID of the contact
*/
public Contact(final String jid) {
mJID = jid;
@@ -110,7 +112,8 @@
}
/**
- * @param mid the mID to set
+ * @param mid
+ * the mID to set
*/
public void setID(int mid) {
mID = mid;
@@ -124,21 +127,23 @@
}
/**
- * @param status the mStatus to set
+ * @param status
+ * the mStatus to set
*/
public void setStatus(int status) {
mStatus = status;
}
/**
- * @param presence the presence containing status
+ * @param presence
+ * the presence containing status
*/
public void setStatus(Presence presence) {
- if (presence.getType().equals(Presence.Type.unavailable)) {
- Log.d(TAG, "Presence pas dispo");
- mStatus = Contact.CONTACT_STATUS_DISCONNECT;
- } else {
- Log.d(TAG,"Presence OK");
+ Log.i(TAG, "NIKITAAAA");
+ /* presence.isAvailable() !?!? */
+ if (presence.getType().equals(Presence.Type.available)) {
+ mStatus = Contact.CONTACT_STATUS_AVAILABLE;
+ Log.d(TAG, "Presence OK");
Mode mode = presence.getMode();
switch (mode) {
case available:
@@ -158,9 +163,12 @@
break;
default:
Log.e("RosterAdapter", "Status mode non gere");
- mStatus = Contact.CONTACT_STATUS_DISCONNECT;
- break;
+ mStatus = Contact.CONTACT_STATUS_AVAILABLE;
+ break;
}
+ } else {
+ Log.d(TAG, "Presence pas dispo");
+ mStatus = Contact.CONTACT_STATUS_DISCONNECT;
}
}
@@ -172,7 +180,8 @@
}
/**
- * @param msgState the mMsgState to set
+ * @param msgState
+ * the mMsgState to set
*/
public void setMMsgState(String msgState) {
mMsgState = msgState;
@@ -188,7 +197,8 @@
/**
* Set the Jabber ID of the contact.
- * @param mjid the jabber ID to set
+ * @param mjid
+ * the jabber ID to set
*/
public void setJID(String mjid) {
mJID = mjid;
@@ -204,7 +214,8 @@
}
/**
- * @param mRes the mRes to set