merge
authorDa Risk <darisk972@gmail.com>
Thu, 17 Sep 2009 17:39:05 +0200
changeset 370 99121cde0136
parent 369 952c6eeb6493 (current diff)
parent 365 c90f06cae09e (diff)
child 371 f2c9564a3cc7
merge
.classpath
src/com/beem/project/beem/service/RosterAdapter.java
src/com/beem/project/beem/service/XmppConnectionAdapter.java
src/com/beem/project/beem/ui/ContactList.java
src/com/beem/project/beem/ui/SendIM.java
--- a/.classpath	Thu Sep 17 17:28:40 2009 +0200
+++ b/.classpath	Thu Sep 17 17:39:05 2009 +0200
@@ -11,8 +11,8 @@
 	<classpathentry kind="lib" path="libs/security.jar"/>
 	<classpathentry kind="lib" path="libs/smack.jar"/>
 	<classpathentry kind="lib" path="libs/smackx.jar"/>
+	<classpathentry kind="lib" path="libs/jlibrtp.jar"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="gen"/>
-	<classpathentry kind="lib" path="libs/jlibrtp.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
--- a/checkstyle.xml	Thu Sep 17 17:28:40 2009 +0200
+++ b/checkstyle.xml	Thu Sep 17 17:39:05 2009 +0200
@@ -1,264 +1,264 @@
-<?xml version="1.0"?>
-<!DOCTYPE module PUBLIC
-    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
-    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
-
-<!--
-
-  Checkstyle configuration that checks the sun coding conventions from:
-
-  - the Java Language Specification at
-  http://java.sun.com/docs/books/jls/second_edition/html/index.html
-
-  - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
-
-  - the Javadoc guidelines at
-  http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
-
-  - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
-
-  - some best practices
-
-  Checkstyle is very configurable. Be sure to read the documentation at
-  http://checkstyle.sf.net (or in your downloaded distribution).
-
-  Most Checks are configurable, be sure to consult the documentation.
-
-  To completely disable a check, just comment it out or delete it from the file.
-
-  Finally, it is worth reading the documentation.
-
--->
-
-<module name="Checker">
-  <!--
-        If you set the basedir property below, then all reported file
-        names will be relative to the specified directory. See
-        http://checkstyle.sourceforge.net/5.x/config.html#Checker
--->
-    <property name="basedir" value="/home/beem/"/>
-
-    <property name="severity" value="warning"/>
-
-    <!-- Checks that a package-info.java file exists for each package.     -->
-    <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
-    <module name="JavadocPackage">
-	<property name="allowLegacy" value="true"/>
-    </module>
-
-    <!-- Checks whether files end with a new line.                        -->
-    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
-    <module name="NewlineAtEndOfFile"/>
-
-    <!-- Checks that property files contain the same keys.         -->
-    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
-    <module name="Translation"/>
-
-    <!-- Checks for Size Violations.                    -->
-    <!-- See http://checkstyle.sf.net/config_sizes.html -->
-    <module name="FileLength"/>
-
-    <!-- Checks for whitespace                               -->
-    <!-- See http://checkstyle.sf.net/config_whitespace.html -->
-    <!-- we want tab
-    <module name="FileTabCharacter"/>
-    -->
-
-    <!-- Miscellaneous other checks.                   -->
-    <!-- See http://checkstyle.sf.net/config_misc.html -->
-    <module name="RegexpSingleline">
-	<property name="format" value="\s+$"/>
-	<property name="minimum" value="0"/>
-	<property name="maximum" value="0"/>
-	<property name="message" value="Line has trailing spaces."/>
-    </module>
-
-
-    <module name="TreeWalker">
-
-	<!-- Checks for Javadoc comments.                     -->
-	<!-- See http://checkstyle.sf.net/config_javadoc.html -->
-	<module name="JavadocMethod">
-	    <property name="allowUndeclaredRTE" value="true"/>
-	</module>
-	<module name="JavadocType"/>
-	<module name="JavadocVariable">
-	    <property name="scope" value="package" />
-	</module>
-	<module name="JavadocStyle">
-	    <property name="checkEmptyJavadoc" value="true"/>
-	</module>
-
-
-	<!-- Checks for Naming Conventions.                  -->
-	<!-- See http://checkstyle.sf.net/config_naming.html -->
-	<module name="ConstantName"/>
-	<module name="LocalFinalVariableName"/>
-	<module name="LocalVariableName"/>
-	<module name="MemberName">
-	    <property  name="format" value="^m[A-Z][a-zA-Z0-9]*$"/>
-	    <property name="severity" value="error"/>
-	</module>
-	<module name="MethodName"/>
-	<module name="PackageName"/>
-	<module name="ParameterName"/>
-	<module name="StaticVariableName"/>
-	<module name="TypeName"/>
-
-
-	<!-- Checks for Headers                                -->
-	<!-- See http://checkstyle.sf.net/config_header.html   -->
-	<!-- <module name="Header">                            -->
-	<!-- The follow property value demonstrates the ability     -->
-	<!-- to have access to ANT properties. In this case it uses -->
-	<!-- the ${basedir} property to allow Checkstyle to be run  -->
-	<!-- from any directory within a project. See property      -->
-	<!-- expansion,                                             -->
-	<!-- http://checkstyle.sf.net/config.html#properties        -->
-	<!-- <property                                              -->
-	<!--     name="headerFile"                                  -->
-	<!--     value="${basedir}/java.header"/>                   -->
-	<!-- </module> -->
-
-	<!-- Following interprets the header file as regular expressions. -->
-	<!-- <module name="RegexpHeader"/>                                -->
-
-
-	<!-- Checks for imports                              -->
-	<!-- See http://checkstyle.sf.net/config_import.html -->
-	<module name="AvoidStarImport"/>
-	<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
-	<module name="RedundantImport"/>
-	<module name="UnusedImports"/>
-	<module name="AvoidStaticImport">
-	    <property name="excludes" value="*"/>
-	</module>
-
-
-	<!-- Checks for Size Violations.                    -->
-	<!-- See http://checkstyle.sf.net/config_sizes.html -->
-	<module name="LineLength">
-	    <property name="max" value="120" />
-	</module>
-	<module name="MethodLength"/>
-	<module name="ParameterNumber"/>
-	<module name="AnonInnerLength">
-	    <property name="max" value="60" />
-	</module>
-
-
-	<!-- Checks for whitespace                               -->
-	<!-- See http://checkstyle.sf.net/config_whitespace.html -->
-	<module name="EmptyForIteratorPad"/>
-	<module name="GenericWhitespace"/>
-	<module name="MethodParamPad"/>
-	<module name="NoWhitespaceAfter"/>
-	<module name="NoWhitespaceBefore"/>
-	<module name="OperatorWrap"/>
-	<module name="ParenPad"/>
-	<module name="TypecastParenPad"/>
-	<!-- We want mixed tabulation
-	  <module name="TabCharacter"/> 
-	  -->
-	<module name="WhitespaceAfter"/>
-	<module name="WhitespaceAround"/>
-
-
-	<!-- Modifier Checks                                    -->
-	<!-- See http://checkstyle.sf.net/config_modifiers.html -->
-	<module name="ModifierOrder"/>
-	<module name="RedundantModifier"/>
-
-
-	<!-- Checks for blocks. You know, those {}'s         -->
-	<!-- See http://checkstyle.sf.net/config_blocks.html -->
-	<module name="AvoidNestedBlocks"/>
-	<module name="EmptyBlock"/>
-	<module name="LeftCurly"/>
-	<!--
-	  <module name="NeedBraces"/>
-	  -->
-	<module name="RightCurly"/>
-
-	<!-- Check for annotations 
-	http://checkstyle.sourceforge.net/config_annotation.html#MissingDeprecated
-	-->
-	<module name="AnnotationUseStyle"/>
-	<module name="MissingDeprecated"/>
-	    <module name="MissingOverride"/>
-
-	<!-- Checks for common coding problems               -->
-	<!-- See http://checkstyle.sf.net/config_coding.html -->
-	<module name="CovariantEquals"/>
-	<module name="AvoidInlineConditionals"/>
-	<module name="InnerAssignment" />
-	<module name="DoubleCheckedLocking"/>    <!-- MY FAVOURITE -->
-	<module name="EmptyStatement"/>
-	<module name="EqualsHashCode"/>
-	<module name="HiddenField">
-	    <property name="ignoreConstructorParameter" value="true"/>
-	    <property name="ignoreAbstractMethods" value="true"/>
-	    <property name="ignoreSetter" value="true"/>
-	</module>
-	<module name="IllegalInstantiation"/>
-	<module name="InnerAssignment"/>
-	<!--
-	  <module name="MagicNumber"/>
-	  -->
-	<module name="MissingSwitchDefault"/>
-	<module name="RedundantThrows"/>
-	<module name="SimplifyBooleanExpression"/>
-	<module name="SimplifyBooleanReturn"/>
-	<module name="StringLiteralEquality"/>
-	<module name="SuperFinalize"/>
-	<module name="IllegalCatch"/>
-	<module name="IllegalThrows"/>
-	<module name="PackageDeclaration"/>
-	<module name="JUnitTestCase"/>
-	<module name="DeclarationOrder"/>
-	<module name="ExplicitInitialization"/>
-	<module name="DefaultComesLast"/>
-	<module name="MissingCtor"/>
-	<module name="FallThrough"/>
-	<module name="MultipleStringLiterals"/>
-	<module name="MultipleVariableDeclarations"/>
-	<module name="UnnecessaryParentheses"/>
-	<module name="ParameterAssignment"/>
-	<module name="SuperClone"/>
-	<module name="EqualsAvoidNull"/>
-	<module name="NoClone"/>
-	<module name="NoFinalizer"/>
-
-	<!-- Checks for class design                         -->
-	<!-- See http://checkstyle.sf.net/config_design.html -->
-	<!-- 
-	  <module name="DesignForExtension"/>
-	  -->
-	<module name="FinalClass"/>
-	<module name="HideUtilityClassConstructor"/>
-	<module name="InterfaceIsType"/>
-	<module name="VisibilityModifier"/>
-	<module name="MutableException"/>
-
-
-	<!-- Miscellaneous other checks.                   -->
-	<!-- See http://checkstyle.sf.net/config_misc.html -->
-	<module name="ArrayTypeStyle"/>
-	<module name="FinalParameters">
-	    <property name="tokens" value="CTOR_DEF"/>
-	</module>
-	<module name="Indentation"/>
-
-	<module name="TodoComment"/>
-	<module name="UpperEll"/>
-
-	<module name="BooleanExpressionComplexity"/>
-	<module name="UpperEll"/>
-
-	<module name="ArrayTypeStyle"/>
-
-    </module>
-    <module name="StrictDuplicateCode"/>
-    <module name="NewlineAtEndOfFile"/>
-
-</module>
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<!--
+
+  Checkstyle configuration that checks the sun coding conventions from:
+
+  - the Java Language Specification at
+  http://java.sun.com/docs/books/jls/second_edition/html/index.html
+
+  - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
+
+  - the Javadoc guidelines at
+  http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
+
+  - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
+
+  - some best practices
+
+  Checkstyle is very configurable. Be sure to read the documentation at
+  http://checkstyle.sf.net (or in your downloaded distribution).
+
+  Most Checks are configurable, be sure to consult the documentation.
+
+  To completely disable a check, just comment it out or delete it from the file.
+
+  Finally, it is worth reading the documentation.
+
+-->
+
+<module name="Checker">
+  <!--
+        If you set the basedir property below, then all reported file
+        names will be relative to the specified directory. See
+        http://checkstyle.sourceforge.net/5.x/config.html#Checker
+-->
+    <property name="basedir" value="/home/beem/"/>
+
+    <property name="severity" value="warning"/>
+
+    <!-- Checks that a package-info.java file exists for each package.     -->
+    <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
+    <module name="JavadocPackage">
+	<property name="allowLegacy" value="true"/>
+    </module>
+
+    <!-- Checks whether files end with a new line.                        -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+    <module name="NewlineAtEndOfFile"/>
+
+    <!-- Checks that property files contain the same keys.         -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+    <module name="Translation"/>
+
+    <!-- Checks for Size Violations.                    -->
+    <!-- See http://checkstyle.sf.net/config_sizes.html -->
+    <module name="FileLength"/>
+
+    <!-- Checks for whitespace                               -->
+    <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+    <!-- we want tab
+    <module name="FileTabCharacter"/>
+    -->
+
+    <!-- Miscellaneous other checks.                   -->
+    <!-- See http://checkstyle.sf.net/config_misc.html -->
+    <module name="RegexpSingleline">
+	<property name="format" value="\s+$"/>
+	<property name="minimum" value="0"/>
+	<property name="maximum" value="0"/>
+	<property name="message" value="Line has trailing spaces."/>
+    </module>
+
+
+    <module name="TreeWalker">
+
+	<!-- Checks for Javadoc comments.                     -->
+	<!-- See http://checkstyle.sf.net/config_javadoc.html -->
+	<module name="JavadocMethod">
+	    <property name="allowUndeclaredRTE" value="true"/>
+	</module>
+	<module name="JavadocType"/>
+	<module name="JavadocVariable">
+	    <property name="scope" value="package" />
+	</module>
+	<module name="JavadocStyle">
+	    <property name="checkEmptyJavadoc" value="true"/>
+	</module>
+
+
+	<!-- Checks for Naming Conventions.                  -->
+	<!-- See http://checkstyle.sf.net/config_naming.html -->
+	<module name="ConstantName"/>
+	<module name="LocalFinalVariableName"/>
+	<module name="LocalVariableName"/>
+	<module name="MemberName">
+	    <property  name="format" value="^m[A-Z][a-zA-Z0-9]*$"/>
+	    <property name="severity" value="error"/>
+	</module>
+	<module name="MethodName"/>
+	<module name="PackageName"/>
+	<module name="ParameterName"/>
+	<module name="StaticVariableName"/>
+	<module name="TypeName"/>
+
+
+	<!-- Checks for Headers                                -->
+	<!-- See http://checkstyle.sf.net/config_header.html   -->
+	<!-- <module name="Header">                            -->
+	<!-- The follow property value demonstrates the ability     -->
+	<!-- to have access to ANT properties. In this case it uses -->
+	<!-- the ${basedir} property to allow Checkstyle to be run  -->
+	<!-- from any directory within a project. See property      -->
+	<!-- expansion,                                             -->
+	<!-- http://checkstyle.sf.net/config.html#properties        -->
+	<!-- <property                                              -->
+	<!--     name="headerFile"                                  -->
+	<!--     value="${basedir}/java.header"/>                   -->
+	<!-- </module> -->
+
+	<!-- Following interprets the header file as regular expressions. -->
+	<!-- <module name="RegexpHeader"/>                                -->
+
+
+	<!-- Checks for imports                              -->
+	<!-- See http://checkstyle.sf.net/config_import.html -->
+	<module name="AvoidStarImport"/>
+	<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+	<module name="RedundantImport"/>
+	<module name="UnusedImports"/>
+	<module name="AvoidStaticImport">
+	    <property name="excludes" value="*"/>
+	</module>
+
+
+	<!-- Checks for Size Violations.                    -->
+	<!-- See http://checkstyle.sf.net/config_sizes.html -->
+	<module name="LineLength">
+	    <property name="max" value="120" />
+	</module>
+	<module name="MethodLength"/>
+	<module name="ParameterNumber"/>
+	<module name="AnonInnerLength">
+	    <property name="max" value="60" />
+	</module>
+
+
+	<!-- Checks for whitespace                               -->
+	<!-- See http://checkstyle.sf.net/config_whitespace.html -->
+	<module name="EmptyForIteratorPad"/>
+	<module name="GenericWhitespace"/>
+	<module name="MethodParamPad"/>
+	<module name="NoWhitespaceAfter"/>
+	<module name="NoWhitespaceBefore"/>
+	<module name="OperatorWrap"/>
+	<module name="ParenPad"/>
+	<module name="TypecastParenPad"/>
+	<!-- We want mixed tabulation
+	  <module name="TabCharacter"/> 
+	  -->
+	<module name="WhitespaceAfter"/>
+	<module name="WhitespaceAround"/>
+
+
+	<!-- Modifier Checks                                    -->
+	<!-- See http://checkstyle.sf.net/config_modifiers.html -->
+	<module name="ModifierOrder"/>
+	<module name="RedundantModifier"/>
+
+
+	<!-- Checks for blocks. You know, those {}'s         -->
+	<!-- See http://checkstyle.sf.net/config_blocks.html -->
+	<module name="AvoidNestedBlocks"/>
+	<module name="EmptyBlock"/>
+	<module name="LeftCurly"/>
+	<!--
+	  <module name="NeedBraces"/>
+	  -->
+	<module name="RightCurly"/>
+
+	<!-- Check for annotations 
+	http://checkstyle.sourceforge.net/config_annotation.html#MissingDeprecated
+	-->
+	<module name="AnnotationUseStyle"/>
+	<module name="MissingDeprecated"/>
+	    <module name="MissingOverride"/>
+
+	<!-- Checks for common coding problems               -->
+	<!-- See http://checkstyle.sf.net/config_coding.html -->
+	<module name="CovariantEquals"/>
+	<module name="AvoidInlineConditionals"/>
+	<module name="InnerAssignment" />
+	<module name="DoubleCheckedLocking"/>    <!-- MY FAVOURITE -->
+	<module name="EmptyStatement"/>
+	<module name="EqualsHashCode"/>
+	<module name="HiddenField">
+	    <property name="ignoreConstructorParameter" value="true"/>
+	    <property name="ignoreAbstractMethods" value="true"/>
+	    <property name="ignoreSetter" value="true"/>
+	</module>
+	<module name="IllegalInstantiation"/>
+	<module name="InnerAssignment"/>
+	<!--
+	  <module name="MagicNumber"/>
+	  -->
+	<module name="MissingSwitchDefault"/>
+	<module name="RedundantThrows"/>
+	<module name="SimplifyBooleanExpression"/>
+	<module name="SimplifyBooleanReturn"/>
+	<module name="StringLiteralEquality"/>
+	<module name="SuperFinalize"/>
+	<module name="IllegalCatch"/>
+	<module name="IllegalThrows"/>
+	<module name="PackageDeclaration"/>
+	<module name="JUnitTestCase"/>
+	<module name="DeclarationOrder"/>
+	<module name="ExplicitInitialization"/>
+	<module name="DefaultComesLast"/>
+	<module name="MissingCtor"/>
+	<module name="FallThrough"/>
+	<module name="MultipleStringLiterals"/>
+	<module name="MultipleVariableDeclarations"/>
+	<module name="UnnecessaryParentheses"/>
+	<module name="ParameterAssignment"/>
+	<module name="SuperClone"/>
+	<module name="EqualsAvoidNull"/>
+	<module name="NoClone"/>
+	<module name="NoFinalizer"/>
+
+	<!-- Checks for class design                         -->
+	<!-- See http://checkstyle.sf.net/config_design.html -->
+	<!-- 
+	  <module name="DesignForExtension"/>
+	  -->
+	<module name="FinalClass"/>
+	<module name="HideUtilityClassConstructor"/>
+	<module name="InterfaceIsType"/>
+	<module name="VisibilityModifier"/>
+	<module name="MutableException"/>
+
+
+	<!-- Miscellaneous other checks.                   -->
+	<!-- See http://checkstyle.sf.net/config_misc.html -->
+	<module name="ArrayTypeStyle"/>
+	<module name="FinalParameters">
+	    <property name="tokens" value="CTOR_DEF"/>
+	</module>
+	<module name="Indentation"/>
+
+	<module name="TodoComment"/>
+	<module name="UpperEll"/>
+
+	<module name="BooleanExpressionComplexity"/>
+	<module name="UpperEll"/>
+
+	<module name="ArrayTypeStyle"/>
+
+    </module>
+    <module name="StrictDuplicateCode"/>
+    <module name="NewlineAtEndOfFile"/>
+
+</module>
--- a/default.properties	Thu Sep 17 17:28:40 2009 +0200
+++ b/default.properties	Thu Sep 17 17:39:05 2009 +0200
@@ -8,7 +8,7 @@
 # project structure.
 
 # Project target.
-target=Google Inc.:Google APIs:3
+target=android-3
 # apk configurations. This property allows creation of APK files with limited
 # resources. For example, if your application contains many locales and
 # you wish to release multiple smaller apks instead of a large one, you can
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/res/layout/contactlist.xml	Thu Sep 17 17:39:05 2009 +0200
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout android:id="@+id/linlayoutBase"
+	android:layout_width="fill_parent" android:layout_height="fill_parent"
+	android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android">
+
+	<LinearLayout android:layout_width="fill_parent"
+		android:layout_height="wrap_content">
+		<Button android:id="@+id/contactlist_left" android:layout_width="wrap_content"
+			android:layout_height="wrap_content" android:text="Left"
+			android:layout_weight="1">
+		</Button>
+		<Button android:id="@+id/contactlist_group" android:layout_width="wrap_content"
+			android:layout_height="wrap_content" android:text="@string/contact_list_all_contact"
+			android:layout_weight="1">
+		</Button>
+		<Button android:id="@+id/contactlist_right" android:layout_width="wrap_content"
+			android:layout_height="wrap_content" android:text="Right"
+			android:layout_weight="1">
+		</Button>
+	</LinearLayout>
+
+	<LinearLayout android:layout_width="fill_parent"
+		android:layout_height="fill_parent" android:orientation="horizontal">
+		<ListView android:id="@+id/contactlist" android:layout_width="fill_parent"
+			android:layout_height="fill_parent" />
+	</LinearLayout>
+
+
+</LinearLayout>
--- a/res/layout/login.xml	Thu Sep 17 17:28:40 2009 +0200
+++ b/res/layout/login.xml	Thu Sep 17 17:39:05 2009 +0200
@@ -8,13 +8,4 @@
 	<TextView android:id="@+id/log_as_msg" android:layout_width="fill_parent"
 		android:layout_height="wrap_content" android:gravity="center"
 		android:textColor="#FF0000" />
-	<LinearLayout android:orientation="vertical"
-		android:layout_width="fill_parent" android:layout_height="fill_parent"
-		android:gravity="bottom">
-		<Button android:id="@+id/log_as_settings" android:layout_width="fill_parent"
-			android:layout_height="wrap_content" android:text="@string/login_settings_button" />
-		<Button android:id="@+id/log_as_login" android:layout_width="fill_parent"
-			android:layout_height="wrap_content" android:text="@string/login_login_button" />
-	</LinearLayout>
-
 </LinearLayout>
\ No newline at end of file
--- a/res/values-en/strings.xml	Thu Sep 17 17:28:40 2009 +0200
+++ b/res/values-en/strings.xml	Thu Sep 17 17:39:05 2009 +0200
@@ -206,5 +206,6 @@
 	 -->
 	 <string name="contact_list_menu_add_contact">Add a contact</string>
 	 <string name="contact_list_menu_settings">Settings</string>
+	 <string name="contact_list_all_contact">All contacts</string>
 
 </resources>
--- a/res/values-fr/strings.xml	Thu Sep 17 17:28:40 2009 +0200
+++ b/res/values-fr/strings.xml	Thu Sep 17 17:39:05 2009 +0200
@@ -200,5 +200,6 @@
 	 -->
 	 <string name="contact_list_menu_add_contact">Ajouter un contact</string>
 	 <string name="contact_list_menu_settings">Paramètres</string>
+	 <string name="contact_list_all_contact">Tous les contacts</string>
 
 </resources>
--- a/src/com/beem/project/beem/BeemService.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/BeemService.java	Thu Sep 17 17:39:05 2009 +0200
@@ -121,7 +121,6 @@
 		@Override
 		public void connectionClosed() throws RemoteException {
 		    Log.i("BeemService", "connectionClosed()");
-
 		}
 
 		@Override
@@ -157,7 +156,7 @@
 			public void processPacket(Packet packet) {
 			    String from = packet.getFrom();
 			    Notification notif = new Notification(com.beem.project.beem.R.drawable.signal,
-				    "Demande d'ajout", System.currentTimeMillis());
+				"Demande d'ajout", System.currentTimeMillis());
 			    notif.defaults = Notification.DEFAULT_ALL;
 			    notif.flags = Notification.FLAG_AUTO_CANCEL;
 			    Intent intent = new Intent(BeemService.this, Subscription.class);
--- a/src/com/beem/project/beem/provider/Beem.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/provider/Beem.java	Thu Sep 17 17:39:05 2009 +0200
@@ -17,12 +17,12 @@
 	 * The query used to create the table
 	 */
 	public final static String QUERY_CREATE       = "CREATE TABLE " + Beem.CONTACTS_TABLE_NAME + " ("
-	                                                      + BaseColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"
-	                                                      + Contacts.UID + " INTEGER, " + Contacts.JID
-	                                                      + " INTEGER," + Contacts.NICKNAME + " TEXT,"
-	                                                      + Contacts.ALIAS + " TEXT," + Contacts.DATE_CREATED
-	                                                      + " INTEGER," + Contacts.DATE_MODIFIED + " INTEGER"
-	                                                      + ");";
+	+ BaseColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"
+	+ Contacts.UID + " INTEGER, " + Contacts.JID
+	+ " INTEGER," + Contacts.NICKNAME + " TEXT,"
+	+ Contacts.ALIAS + " TEXT," + Contacts.DATE_CREATED
+	+ " INTEGER," + Contacts.DATE_MODIFIED + " INTEGER"
+	+ ");";
 
 	/**
 	 * The content:// style URL for Contacts table
@@ -103,9 +103,9 @@
 	 * The query used to create the table
 	 */
 	public final static String QUERY_CREATE       = "CREATE TABLE " + Beem.USERS_TABLE_NAME + " ("
-	                                                      + BaseColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"
-	                                                      + Users.JUSERNAME + " TEXT," + Users.DATE_CREATED
-	                                                      + " INTEGER," + Users.DATE_MODIFIED + " INTEGER" + ");";
+	+ BaseColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"
+	+ Users.JUSERNAME + " TEXT," + Users.DATE_CREATED
+	+ " INTEGER," + Users.DATE_MODIFIED + " INTEGER" + ");";
 
 	/**
 	 * The content:// style URL for Contacts table
--- a/src/com/beem/project/beem/provider/BeemDatabaseHelper.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/provider/BeemDatabaseHelper.java	Thu Sep 17 17:39:05 2009 +0200
@@ -27,7 +27,7 @@
     @Override
     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
 	Log.w(this.mTag, "Upgrading database from version " + oldVersion + " to " + newVersion
-	        + ", which will destroy all old data");
+	    + ", which will destroy all old data");
 	db.execSQL("DROP TABLE IF EXISTS " + this.mTableName + ";");
 	onCreate(db);
     }
--- a/src/com/beem/project/beem/provider/ContactProvider.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/provider/ContactProvider.java	Thu Sep 17 17:39:05 2009 +0200
@@ -53,18 +53,18 @@
 	int count;
 
 	switch (sUriMatcher.match(uri)) {
-	case CONTACTS:
-	    count = db.delete(Beem.CONTACTS_TABLE_NAME, selection, selectionArgs);
-	    break;
+	    case CONTACTS:
+		count = db.delete(Beem.CONTACTS_TABLE_NAME, selection, selectionArgs);
+		break;
 
-	case CONTACT_ID:
-	    String contactId = uri.getPathSegments().get(1);
-	    count = db.delete(Beem.CONTACTS_TABLE_NAME, BaseColumns._ID + "=" + contactId
+	    case CONTACT_ID:
+		String contactId = uri.getPathSegments().get(1);
+		count = db.delete(Beem.CONTACTS_TABLE_NAME, BaseColumns._ID + "=" + contactId
 		    + (!TextUtils.isEmpty(selection) ? " AND (" + selection + ')' : ""), selectionArgs);
-	    break;
+		break;
 
-	default:
-	    throw new IllegalArgumentException("Unknown URI " + uri);
+	    default:
+		throw new IllegalArgumentException("Unknown URI " + uri);
 	}
 
 	getContext().getContentResolver().notifyChange(uri, null);
@@ -74,14 +74,14 @@
     @Override
     public String getType(Uri uri) {
 	switch (sUriMatcher.match(uri)) {
-	case CONTACTS:
-	    return Beem.Contacts.CONTENT_TYPE;
+	    case CONTACTS:
+		return Beem.Contacts.CONTENT_TYPE;
 
-	case CONTACT_ID:
-	    return Beem.Contacts.CONTENT_ITEM_TYPE;
+	    case CONTACT_ID:
+		return Beem.Contacts.CONTENT_ITEM_TYPE;
 
-	default:
-	    throw new IllegalArgumentException("Unknown URI " + uri);
+	    default:
+		throw new IllegalArgumentException("Unknown URI " + uri);
 	}
     }
 
@@ -149,19 +149,19 @@
 	SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
 
 	switch (sUriMatcher.match(uri)) {
-	case CONTACTS:
-	    qb.setTables(Beem.CONTACTS_TABLE_NAME);
-	    qb.setProjectionMap(sContactsProjectionMap);
-	    break;
+	    case CONTACTS:
+		qb.setTables(Beem.CONTACTS_TABLE_NAME);
+		qb.setProjectionMap(sContactsProjectionMap);
+		break;
 
-	case CONTACT_ID:
-	    qb.setTables(Beem.USERS_TABLE_NAME);
-	    qb.setProjectionMap(sContactsProjectionMap);
-	    qb.appendWhere(BaseColumns._ID + "=" + uri.getPathSegments().get(1));
-	    break;
+	    case CONTACT_ID:
+		qb.setTables(Beem.USERS_TABLE_NAME);
+		qb.setProjectionMap(sContactsProjectionMap);
+		qb.appendWhere(BaseColumns._ID + "=" + uri.getPathSegments().get(1));
+		break;
 
-	default:
-	    throw new IllegalArgumentException("Unknown URI " + uri);
+	    default:
+		throw new IllegalArgumentException("Unknown URI " + uri);
 	}
 
 	// If no sort order is specified use the default
@@ -187,18 +187,18 @@
 	int count;
 
 	switch (sUriMatcher.match(uri)) {
-	case CONTACTS:
-	    count = db.update(Beem.CONTACTS_TABLE_NAME, values, selection, selectionArgs);
-	    break;
+	    case CONTACTS:
+		count = db.update(Beem.CONTACTS_TABLE_NAME, values, selection, selectionArgs);
+		break;
 
-	case CONTACT_ID:
-	    String contactId = uri.getPathSegments().get(1);
-	    count = db.update(Beem.CONTACTS_TABLE_NAME, values, BaseColumns._ID + "=" + contactId
+	    case CONTACT_ID:
+		String contactId = uri.getPathSegments().get(1);
+		count = db.update(Beem.CONTACTS_TABLE_NAME, values, BaseColumns._ID + "=" + contactId
 		    + (!TextUtils.isEmpty(selection) ? " AND (" + selection + ')' : ""), selectionArgs);
-	    break;
+		break;
 
-	default:
-	    throw new IllegalArgumentException("Unknown URI " + uri);
+	    default:
+		throw new IllegalArgumentException("Unknown URI " + uri);
 	}
 
 	getContext().getContentResolver().notifyChange(uri, null);
--- a/src/com/beem/project/beem/provider/UserProvider.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/provider/UserProvider.java	Thu Sep 17 17:39:05 2009 +0200
@@ -44,18 +44,18 @@
 	int count;
 
 	switch (sUriMatcher.match(uri)) {
-	case USERS:
-	    count = db.delete(Beem.USERS_TABLE_NAME, selection, selectionArgs);
-	    break;
+	    case USERS:
+		count = db.delete(Beem.USERS_TABLE_NAME, selection, selectionArgs);
+		break;
 
-	case USER_ID:
-	    String userID = uri.getPathSegments().get(1);
-	    count = db.delete(Beem.USERS_TABLE_NAME, BaseColumns._ID + "=" + userID
+	    case USER_ID:
+		String userID = uri.getPathSegments().get(1);
+		count = db.delete(Beem.USERS_TABLE_NAME, BaseColumns._ID + "=" + userID
 		    + (!TextUtils.isEmpty(selection) ? " AND (" + selection + ')' : ""), selectionArgs);
-	    break;
+		break;
 
-	default:
-	    throw new IllegalArgumentException("Unknown URI " + uri);
+	    default:
+		throw new IllegalArgumentException("Unknown URI " + uri);
 	}
 
 	getContext().getContentResolver().notifyChange(uri, null);
@@ -65,14 +65,14 @@
     @Override
     public String getType(Uri uri) {
 	switch (sUriMatcher.match(uri)) {
-	case USERS:
-	    return Beem.Users.CONTENT_TYPE;
+	    case USERS:
+		return Beem.Users.CONTENT_TYPE;
 
-	case USER_ID:
-	    return Beem.Users.CONTENT_ITEM_TYPE;
+	    case USER_ID:
+		return Beem.Users.CONTENT_ITEM_TYPE;
 
-	default:
-	    throw new IllegalArgumentException("Unknown URI " + uri);
+	    default:
+		throw new IllegalArgumentException("Unknown URI " + uri);
 	}
     }
 
@@ -127,19 +127,19 @@
 	SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
 
 	switch (sUriMatcher.match(uri)) {
-	case USERS:
-	    qb.setTables(Beem.USERS_TABLE_NAME);
-	    qb.setProjectionMap(sUsersProjectionMap);
-	    break;
+	    case USERS:
+		qb.setTables(Beem.USERS_TABLE_NAME);
+		qb.setProjectionMap(sUsersProjectionMap);
+		break;
 
-	case USER_ID:
-	    qb.setTables(Beem.USERS_TABLE_NAME);
-	    qb.setProjectionMap(sUsersProjectionMap);
-	    qb.appendWhere(BaseColumns._ID + "=" + uri.getPathSegments().get(1));
-	    break;
+	    case USER_ID:
+		qb.setTables(Beem.USERS_TABLE_NAME);
+		qb.setProjectionMap(sUsersProjectionMap);
+		qb.appendWhere(BaseColumns._ID + "=" + uri.getPathSegments().get(1));
+		break;
 
-	default:
-	    throw new IllegalArgumentException("Unknown URI " + uri);
+	    default:
+		throw new IllegalArgumentException("Unknown URI " + uri);
 	}
 
 	// If no sort order is specified use the default
@@ -165,18 +165,18 @@
 	int count;
 
 	switch (sUriMatcher.match(uri)) {
-	case USERS:
-	    count = db.update(Beem.USERS_TABLE_NAME, values, selection, selectionArgs);
-	    break;
+	    case USERS:
+		count = db.update(Beem.USERS_TABLE_NAME, values, selection, selectionArgs);
+		break;
 
-	case USER_ID:
-	    String userId = uri.getPathSegments().get(1);
-	    count = db.update(Beem.USERS_TABLE_NAME, values, BaseColumns._ID + "=" + userId
+	    case USER_ID:
+		String userId = uri.getPathSegments().get(1);
+		count = db.update(Beem.USERS_TABLE_NAME, values, BaseColumns._ID + "=" + userId
 		    + (!TextUtils.isEmpty(selection) ? " AND (" + selection + ')' : ""), selectionArgs);
-	    break;
+		break;
 
-	default:
-	    throw new IllegalArgumentException("Unknown URI " + uri);
+	    default:
+		throw new IllegalArgumentException("Unknown URI " + uri);
 	}
 
 	getContext().getContentResolver().notifyChange(uri, null);
--- a/src/com/beem/project/beem/service/BeemChatManager.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/service/BeemChatManager.java	Thu Sep 17 17:39:05 2009 +0200
@@ -1,6 +1,3 @@
-/**
- *
- */
 package com.beem.project.beem.service;
 
 import java.util.HashMap;
@@ -66,7 +63,7 @@
 		} catch (RemoteException e) {
 		    // The RemoteCallbackList will take care of removing the
 		    // dead listeners.
-		    Log.w(TAG, "Error while triggering remote connection listeners", e);
+		    Log.w(TAG, " Error while triggering remote connection listeners in chat creation", e);
 		}
 	    }
 	    mRemoteChatCreationListeners.finishBroadcast();
--- a/src/com/beem/project/beem/service/ChatAdapter.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/service/ChatAdapter.java	Thu Sep 17 17:39:05 2009 +0200
@@ -1,6 +1,3 @@
-/**
- * 
- */
 package com.beem.project.beem.service;
 
 import java.util.Collections;
--- a/src/com/beem/project/beem/service/Message.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/service/Message.java	Thu Sep 17 17:39:05 2009 +0200
@@ -1,6 +1,3 @@
-/**
- * 
- */
 package com.beem.project.beem.service;
 
 import org.jivesoftware.smack.packet.XMPPError;
@@ -34,15 +31,6 @@
      * Error message type.
      */
     public static final int MSG_TYPE_ERROR = 400;
-
-    private int mType;
-    private String mBody;
-    private String mSubject;
-    private String mTo;
-    private String mFrom;
-    private String mThread;
-    // TODO ajouter l'erreur
-
     /**
      * Parcelable.Creator needs by Android.
      */
@@ -59,6 +47,15 @@
 	}
     };
 
+    private int mType;
+    private String mBody;
+    private String mSubject;
+    private String mTo;
+    private String mFrom;
+    private String mThread;
+    // TODO ajouter l'erreur
+
+
     /**
      * Constructor.
      * @param to the destinataire of the message
@@ -85,7 +82,7 @@
      * Construct a message from a smack message packet.
      * @param smackMsg Smack message packet
      */
-    public Message(org.jivesoftware.smack.packet.Message smackMsg) {
+    public Message(final org.jivesoftware.smack.packet.Message smackMsg) {
 	this(smackMsg.getTo());
 	switch (smackMsg.getType()) {
 	    case chat:
@@ -214,10 +211,10 @@
 
     /**
      * Set the from field of the message.
-     * @param mFrom the mFrom to set
+     * @param from the mFrom to set
      */
-    public void setFrom(String mFrom) {
-	this.mFrom = mFrom;
+    public void setFrom(String from) {
+	this.mFrom = from;
     }
 
     /**
--- a/src/com/beem/project/beem/service/PresenceAdapter.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/service/PresenceAdapter.java	Thu Sep 17 17:39:05 2009 +0200
@@ -8,32 +8,41 @@
 import com.beem.project.beem.utils.PresenceType;
 import com.beem.project.beem.utils.Status;
 
+/**
+ * this class contain contact presence informations.
+ * @author nikita
+ */
 public class PresenceAdapter implements Parcelable {
 
+    /**
+     * Parcelable.Creator needs by Android.
+     */
+    public static final Parcelable.Creator<PresenceAdapter> CREATOR = new Parcelable.Creator<PresenceAdapter>() {
+
+	@Override
+	public PresenceAdapter createFromParcel(
+	    Parcel source) {
+	    return new PresenceAdapter(source);
+	}
+
+	@Override
+	public PresenceAdapter[] newArray(int size) {
+	    return new PresenceAdapter[size];
+	}
+    };
+
     private int                                             mType;
     private int                                             mStatus;
     private String                                          mTo;
     private String                                          mFrom;
     private String                                          mStatusText;
 
+
     /**
-     * Parcelable.Creator needs by Android.
+     * constructor from Parcel.
+     * @param source parcelable presence.
      */
-    public static final Parcelable.Creator<PresenceAdapter> CREATOR = new Parcelable.Creator<PresenceAdapter>() {
-
-	                                                                @Override
-	                                                                public PresenceAdapter createFromParcel(
-	                                                                        Parcel source) {
-		                                                            return new PresenceAdapter(source);
-	                                                                }
-
-	                                                                @Override
-	                                                                public PresenceAdapter[] newArray(int size) {
-		                                                            return new PresenceAdapter[size];
-	                                                                }
-	                                                            };
-
-    public PresenceAdapter(Parcel source) {
+    public PresenceAdapter(final Parcel source) {
 	mType = source.readInt();
 	mStatus = source.readInt();
 	mTo = source.readString();
@@ -41,7 +50,11 @@
 	mStatusText = source.readString();
     }
 
-    public PresenceAdapter(Presence presence) {
+    /**
+     * constructor from smack Presence.
+     * @param presence smack presence.
+     */
+    public PresenceAdapter(final Presence presence) {
 	mType = PresenceType.getPresenceType(presence);
 	mStatus = Status.getStatusFromPresence(presence);
 	mTo = presence.getTo();
@@ -56,6 +69,7 @@
     }
 
     /**
+     * mFrom getter.
      * @return the mFrom
      */
     public String getFrom() {
@@ -63,6 +77,7 @@
     }
 
     /**
+     * mStatus getter.
      * @return the mStatus
      */
     public int getStatus() {
@@ -70,6 +85,7 @@
     }
 
     /**
+     * mStatusText getter.
      * @return the mStatusText
      */
     public String getStatusText() {
@@ -77,6 +93,7 @@
     }
 
     /**
+     * mTo getter.
      * @return the mTo
      */
     public String getTo() {
@@ -84,6 +101,7 @@
     }
 
     /**
+     * mType getter.
      * @return the mType
      */
     public int getType() {
@@ -91,43 +109,43 @@
     }
 
     /**
-     * @param mFrom
-     *            the mFrom to set
+     * mFrom setter.
+     * @param from the mFrom to set
      */
-    public void setFrom(String mFrom) {
-	this.mFrom = mFrom;
+    public void setFrom(final String from) {
+	this.mFrom = from;
     }
 
     /**
-     * @param mStatus
-     *            the mStatus to set
+     * mStatus setter.
+     * @param status the mStatus to set
      */
-    public void setStatus(int mStatus) {
-	this.mStatus = mStatus;
+    public void setStatus(final int status) {
+	this.mStatus = status;
     }
 
     /**
-     * @param mStatusText
-     *            the mStatusText to set
+     * mStatusText setter.
+     * @param statusText the mStatusText to set
      */
-    public void setStatusText(String mStatusText) {
-	this.mStatusText = mStatusText;
+    public void setStatusText(final String statusText) {
+	this.mStatusText = statusText;
     }
 
     /**
-     * @param mTo
-     *            the mTo to set
+     * mTo setter.
+     * @param to the mTo to set
      */
-    public void setTo(String mTo) {
-	this.mTo = mTo;
+    public void setTo(final String to) {
+	this.mTo = to;
     }
 
     /**
-     * @param mType
-     *            the mType to set
+     * mType setter.
+     * @param type the type to set
      */
-    public void setType(int mType) {
-	this.mType = mType;
+    public void setType(int type) {
+	this.mType = type;
     }
 
     @Override
--- a/src/com/beem/project/beem/service/PrivacyListManagerAdapter.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/service/PrivacyListManagerAdapter.java	Thu Sep 17 17:39:05 2009 +0200
@@ -1,6 +1,3 @@
-/**
- * 
- */
 package com.beem.project.beem.service;
 
 import java.util.ArrayList;
@@ -19,27 +16,48 @@
 import com.beem.project.beem.service.aidl.IPrivacyListManager;
 
 /**
+ * Privacy list manager in beem.
  * @author nikita
- * A finir
  */
 public class PrivacyListManagerAdapter extends IPrivacyListManager.Stub {
+
+    /**
+     * Tag.
+     */
     public static final String TAG = "PrivacyListManagerAdapter";
-    private PrivacyListManager mAdaptee = null;
+    /**
+     * default privacy list name.
+     */
+    public static final String DEFAULT_PRIVACYLIST = "default";
+
+    private PrivacyListManager mAdaptee;
     private List<String> mBlockedUser = new ArrayList<String>();
     private XMPPConnection mConnection;
     private MyPrivacyListListener mPrivacyPacketListener = new MyPrivacyListListener();
 
-    public PrivacyListManagerAdapter(XMPPConnection connection) {
+    /**
+     * Privacy list constructor.
+     * @param connection xmppconnection used.
+     */
+    public PrivacyListManagerAdapter(final XMPPConnection connection) {
 	mConnection = connection;
 	mAdaptee = PrivacyListManager.getInstanceFor(mConnection);
 	mAdaptee.addListener(mPrivacyPacketListener);
     }
 
+    /**
+     * return the blocked user list.
+     * @return blocked user list
+     */
     public List<String> getBlockedUsers() {
 	return mBlockedUser;
     }
 
-    public synchronized void addBlockedUser(String jid) {
+    /**
+     * add an user to the blocked user list.
+     * @param jid blocked user jid
+     */
+    public synchronized void addBlockedUser(final String jid) {
 	if (mAdaptee == null) {
 	    mAdaptee = PrivacyListManager.getInstanceFor(mConnection);
 	    mAdaptee.addListener(mPrivacyPacketListener);
@@ -47,7 +65,7 @@
 	List<PrivacyItem> pItemList = new ArrayList<PrivacyItem>();
 	PrivacyItem pItem = new PrivacyItem("jid", true, 1);
 	pItem.setFilterMessage(true);
-	pItem.setValue(jid);	
+	pItem.setValue(jid);
 	pItemList.add(pItem);
 
 	pItem = new PrivacyItem("subscription", true, 2);
@@ -55,8 +73,8 @@
 	pItemList.add(pItem);
 
 	try {
-	    if (mAdaptee.getPrivacyList("default") == null) {
-
+	    if (mAdaptee.getPrivacyList(DEFAULT_PRIVACYLIST) == null) {
+		mAdaptee.createPrivacyList(DEFAULT_PRIVACYLIST, pItemList);
 	    }
 
 	} catch (XMPPException e) {
@@ -65,15 +83,15 @@
 	} catch (ClassCastException e) {
 	    e.printStackTrace();
 	    try {
-		mAdaptee.createPrivacyList("default", pItemList);
+		mAdaptee.createPrivacyList(DEFAULT_PRIVACYLIST, pItemList);
 	    } catch (XMPPException e1) {
 		// TODO Auto-generated catch block
 		e1.printStackTrace();
 	    }
 	}
 	try {
-	    mAdaptee.setActiveListName("default");
-	    mAdaptee.setDefaultListName("default");
+	    mAdaptee.setActiveListName(DEFAULT_PRIVACYLIST);
+	    mAdaptee.setDefaultListName(DEFAULT_PRIVACYLIST);
 	} catch (XMPPException e) {
 	    // TODO Auto-generated catch block
 	    e.printStackTrace();
@@ -82,17 +100,26 @@
 	Log.d(TAG, "addBlockedUser");
     }
 
+    /**
+     * privacy list listener.
+     * @author nikita
+     */
     class MyPrivacyListListener implements PrivacyListListener {
+	/**
+	 * constructor.
+	 */
+	public MyPrivacyListListener() {
+	}
 
 	@Override
 	public void setPrivacyList(String listName, List<PrivacyItem> listItem) {
-	    Log.d(TAG,"setPrivacyList");
+	    Log.d(TAG, "setPrivacyList");
 	}
 
 	@Override
 	public void updatedPrivacyList(String listName) {
-	    Log.d(TAG,"updatedPrivacyList");
-	}	
+	    Log.d(TAG, "updatedPrivacyList");
+	}
     }
 
     @Override
@@ -101,7 +128,11 @@
 	return null;
     }
 
+    /**
+     * adaptee getter.
+     * @return the current PrivacyListManager instance
+     */
     public PrivacyListManager getManager() {
 	return mAdaptee;
-    }   
+    }
 }
--- a/src/com/beem/project/beem/service/RosterAdapter.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/service/RosterAdapter.java	Thu Sep 17 17:39:05 2009 +0200
@@ -1,6 +1,3 @@
-/**
- *
- */
 package com.beem.project.beem.service;
 
 
@@ -93,7 +90,6 @@
 		mAdaptee.removeEntry(entry);
 	    } else {
 		mAdaptee.getGroup(group).removeEntry(entry);
-		mRosterListener.onEntryDeleteFromGroup(group, contact.getJID());
 	    }
 	} catch (XMPPException e) {
 	    e.printStackTrace();
@@ -200,7 +196,7 @@
 	 * Event which is fired when an entry is deleted for a group.
 	 * @param group the group the entry was.
 	 * @param jid the jid of the entry which is deleted.
-	 */
+	 * /
 	public void onEntryDeleteFromGroup(String group, String jid) {
 	    //Log.i(TAG, "entry delete listener");
 	    final int n = mRemoteRosListeners.beginBroadcast();
@@ -214,7 +210,7 @@
 	    }
 	    mRemoteRosListeners.finishBroadcast();
 
-	}
+	} */
 
 	/**
 	 * {@inheritDoc}
@@ -295,7 +291,7 @@
 		} catch (RemoteException e) {
 		    // The RemoteCallbackList will take care of removing the
 		    // dead listeners.
-		    Log.w(TAG, "Error while updating roster entries", e);
+		    Log.w(TAG, "Error while updating roster entries presence", e);
 		}
 	    }
 	    mRemoteRosListeners.finishBroadcast();
--- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java	Thu Sep 17 17:39:05 2009 +0200
@@ -231,8 +231,8 @@
      * Set the privacy list to use.
      * @param mPrivacyList the mPrivacyList to set
      */
-    public void setPrivacyList(PrivacyListManagerAdapter mPrivacyList) {
-	this.mPrivacyList = mPrivacyList;
+    public void setPrivacyList(PrivacyListManagerAdapter privacyList) {
+	this.mPrivacyList = privacyList;
     }
 
     /**
@@ -332,7 +332,7 @@
 		} catch (RemoteException e) {
 		    // The RemoteCallbackList will take care of removing the
 		    // dead listeners.
-		    Log.w(TAG, "Error while triggering remote connection listeners", e);
+		    Log.w(TAG, "Eror while triggering remote connection listeners", e);
 		}
 	    }
 	    mRemoteConnListeners.finishBroadcast();
--- a/src/com/beem/project/beem/service/XmppFacade.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/service/XmppFacade.java	Thu Sep 17 17:39:05 2009 +0200
@@ -18,7 +18,6 @@
 
 /**
  * This class is a facade for the Beem Service.
- * 
  * @author darisk
  */
 public class XmppFacade extends IXmppFacade.Stub {
@@ -29,11 +28,9 @@
 
     /**
      * Constructor for XMPPFacade.
-     * 
-     * @param connection
-     *            the connection use by the facade
-     * @param service
-     *            the service which holds the facade
+     * @param connection the connection use by the facade
+     * @param service the service which holds the facade
+     * @param jingle the jingle session
      */
     public XmppFacade(final XmppConnectionAdapter connection, final BeemService service, final JingleService jingle) {
 	this.mConnexion = connection;
@@ -55,14 +52,16 @@
 	mConnexion.getAdaptee().sendPacket(pres);
 
 	Notification mStatusNotification;
-	String text = (msg == null ? "" : msg);
+	String text = "";
+	if (msg != null)
+	    text = msg;
 	mStatusNotification = new Notification(com.beem.project.beem.R.drawable.notify_signal, text, System
-	        .currentTimeMillis());
+	    .currentTimeMillis());
 	mStatusNotification.defaults = Notification.DEFAULT_ALL;
 	mStatusNotification.flags = Notification.FLAG_NO_CLEAR;
 
 	mStatusNotification.setLatestEventInfo(mBeemService, "Beem Status", text, PendingIntent.getActivity(
-	        mBeemService, 0, new Intent(mBeemService, ChangeStatus.class), 0));
+	    mBeemService, 0, new Intent(mBeemService, ChangeStatus.class), 0));
 	mBeemService.sendNotification(BeemService.NOTIFICATION_STATUS_ID, mStatusNotification);
     }
 
@@ -125,9 +124,9 @@
     public void blockUser(String jid) throws RemoteException {
 	mConnexion.getPrivacyList().addBlockedUser(jid);
     }
-    
+
     @Override
     public void call(String jid) throws RemoteException {
-	mJingle.call(jid);	
+	mJingle.call(jid);
     }
 }
--- a/src/com/beem/project/beem/service/aidl/IBeemRosterListener.aidl	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/service/aidl/IBeemRosterListener.aidl	Thu Sep 17 17:39:05 2009 +0200
@@ -7,5 +7,4 @@
     void onEntriesUpdated(in List<String> addresses);
     void onEntriesDeleted(in List<String> addresses);
     void onPresenceChanged(in PresenceAdapter presence);
-    void onEntryDeleteFromGroup(in String group, in String jid);
 }
\ No newline at end of file
--- a/src/com/beem/project/beem/ui/ContactList.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactList.java	Thu Sep 17 17:39:05 2009 +0200
@@ -1,19 +1,16 @@
 package com.beem.project.beem.ui;
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import org.jivesoftware.smack.util.StringUtils;
 
-import android.app.ExpandableListActivity;
+import android.app.Activity;
 import android.content.ComponentName;
+import android.content.Context;
 import android.content.Intent;
 import android.content.ServiceConnection;
-import android.database.DataSetObserver;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.os.Handler;
@@ -26,11 +23,14 @@
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
-import android.view.View.OnClickListener;
-import android.view.View.OnLongClickListener;
-import android.widget.ExpandableListAdapter;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.Button;
 import android.widget.ImageView;
+import android.widget.ListView;
 import android.widget.TextView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.AdapterView.OnItemLongClickListener;
 
 import com.beem.project.beem.BeemService;
 import com.beem.project.beem.R;
@@ -45,21 +45,27 @@
 /**
  * The contact list activity displays the roster of the user.
  */
-public class ContactList extends ExpandableListActivity {
+public class ContactList extends Activity {
 
-    public static final String DEFAULT_GROUP = "Default";
     private static final String TAG = "CONTACTLIST_ACT";
     private static final int REQUEST_CODE = 1;
-    private MyExpandableListAdapter mAdapter;
+    private BeemContactList mAdapter;
     private IRoster mRoster;
-    private Map<String, List<Contact>> mGroupMap;
-    private List<String> mGroupName;
     private List<Contact> mListContact;
+    private List<String> mListGroup;
+    private int mPosCurGroup = -1;
     private Handler mHandler;
     private IXmppFacade mXmppFacade;
     private final ServiceConnection mServConn = new BeemServiceConnection();
 
     /**
+     * Constructor.
+     */
+    public ContactList() {
+
+    }
+
+    /**
      * Callback for menu creation.
      * @param menu the menu created
      * @return true on success, false otherwise
@@ -106,34 +112,153 @@
     @Override
     protected void onCreate(Bundle saveBundle) {
 	super.onCreate(saveBundle);
+	setContentView(R.layout.contactlist);
+	mAdapter = new BeemContactList(this);
+	Button b = (Button) findViewById(R.id.contactlist_group);
+	b.setOnClickListener(new OnClickGroupName());
+	b = (Button) findViewById(R.id.contactlist_left);
+	b.setOnClickListener(new OnClickLeft());
+	b = (Button) findViewById(R.id.contactlist_right);
+	b.setOnClickListener(new OnClickRight());
 	mHandler = new Handler();
-	mGroupMap = new HashMap<String, List<Contact>>();
-	mGroupName = new ArrayList<String>();
+
+    }
+
+    /**
+     * Event on middle groupe name.
+     */
+    private class OnClickGroupName implements View.OnClickListener {
+	/**
+	 * Constructor.
+	 */
+	public OnClickGroupName() {
+
+	}
+
+	@Override
+	public void onClick(View arg0) {
+
+	}
     }
 
+    /**
+     * Event on left groupe name.
+     */
+    private class OnClickLeft implements View.OnClickListener {
+	/**
+	 * Constructor.
+	 */
+	public OnClickLeft() {
+
+	}
+
+	@Override
+	public void onClick(View arg0) {
+	    mPosCurGroup--;
+	    if (mPosCurGroup < -1)
+		mPosCurGroup = mListGroup.size() - 1;
+	    Button b = (Button) findViewById(R.id.contactlist_group);
+	    if (mPosCurGroup == -1)
+		b.setText(R.string.contact_list_all_contact);
+	    else
+		b.setText(mListGroup.get(mPosCurGroup));
+	    try {
+		buildContactList(mRoster.getContactList(), mRoster.getGroupsNames());
+	    } catch (RemoteException e) {
+		e.printStackTrace();
+	    }
+	    mAdapter.notifyDataSetChanged();
+	    mAdapter.notifyDataSetChanged();
+	}
+    }
+
+    /**
+     * Event on right groupe name.
+     */
+    private class OnClickRight implements View.OnClickListener {
+
+	/**
+	 * Constructor.
+	 */
+	public OnClickRight() {
+
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public void onClick(View v) {
+	    mPosCurGroup++;
+	    if (mPosCurGroup == mListGroup.size())
+		mPosCurGroup = -1;
+	    Button b = (Button) findViewById(R.id.contactlist_group);
+	    if (mPosCurGroup == -1)
+		b.setText(R.string.contact_list_all_contact);
+	    else
+		b.setText(mListGroup.get(mPosCurGroup));
+	    try {
+		buildContactList(mRoster.getContactList(), mRoster.getGroupsNames());
+	    } catch (RemoteException e) {
+		e.printStackTrace();
+	    }
+	    mAdapter.notifyDataSetChanged();
+	}
+    }
+
+    /**
+     * {@inheritDoc}
+     */
     @Override
     protected void onStart() {
 	super.onStart();
 	bindService(new Intent(this, BeemService.class), mServConn, BIND_AUTO_CREATE);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     @Override
     protected void onStop() {
 	Log.e(TAG, "UNBINSERVICE");
 	super.onStop();
 	unbindService(mServConn);
-	mGroupName.clear();
-	mGroupMap.clear();
     }
 
+    /**
+     * Comparator Contact by Name.
+     */
     class ComparatorContactListByName<T> implements Comparator<T> {
+	/**
+	 * Constructor.
+	 */
+	public ComparatorContactListByName() {
+
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
 	@Override
 	public int compare(T c1, T c2) {
 	    return ((Contact) c1).getName().compareToIgnoreCase(((Contact) c2).getName());
 	}
     }
 
+    /**
+     * Comparator Contact by status and name.
+     */
     class ComparatorContactListByStatusAndName<T> implements Comparator<T> {
+	/**
+	 * Constructor.
+	 */
+	public ComparatorContactListByStatusAndName() {
+
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
 	@Override
 	public int compare(T c1, T c2) {
 	    if (((Contact) c1).getStatus() < ((Contact) c2).getStatus()) {
@@ -145,74 +270,142 @@
 	}
     }
 
-    private void buildContactList(List<Contact> listContact) {
-	mListContact = listContact;
-	Collections.sort(mListContact, new ComparatorContactListByStatusAndName<Contact>());
-	Collections.sort(mGroupName);
-	for (Contact contact : mListContact) {
-	    for (String group : contact.getGroups()) {
-		addGroup(group);
-		addContactInGroup(contact, group);
-	    }
-	    if (contact.getGroups().isEmpty()) {
-		addGroup(DEFAULT_GROUP);
-		addContactInGroup(contact, DEFAULT_GROUP);
+    /**
+     * Contact List construction.
+     * @param listContact Contact list.
+     * @param listGroup Group list.
+     */
+    private void buildContactList(List<Contact> listContact, List<String> listGroup) {
+	mListGroup = listGroup;
+	Collections.sort(mListGroup);
+	if (mListContact != null)
+	    mListContact.clear();
+	if (mPosCurGroup == -1)
+	    mListContact = listContact;
+	else {
+	    String curGroup = mListGroup.get(mPosCurGroup);
+	    for (Contact c : listContact) {
+		if (c.getGroups().contains(curGroup)) {
+		    mListContact.add(c);
+		}
 	    }
 	}
-	Collections.sort(mGroupName);
-	mAdapter = new MyExpandableListAdapter();
-	setListAdapter(mAdapter);
+
+	sortBeemContactList();
+
+	ListView listView = (ListView) findViewById(R.id.contactlist);
+	listView.setOnItemClickListener(new BeemContactListOnClick());
+	listView.setOnItemLongClickListener(new BeemContactListOnLongClick());
+	listView.setAdapter(mAdapter);
     }
 
-    protected void addGroup(String group) {
-	if (!mGroupMap.containsKey(group)) {
-	    mGroupMap.put(group, new ArrayList<Contact>());
-	    mGroupName.add(group);
+    /**
+     * Event simple click on item of the contact list.
+     */
+    public class BeemContactListOnClick implements OnItemClickListener {
+	/**
+	 * Constructor.
+	 */
+	public BeemContactListOnClick() {
+
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public void onItemClick(AdapterView<?> arg0, View v, int pos, long lpos) {
+	    Contact c = mListContact.get(pos);
+	    Intent i = new Intent(ContactList.this, SendIM.class);
+	    i.setData(c.toUri());
+	    startActivity(i);
 	}
     }
 
-    protected void addContactInGroup(Contact c, String group) {
-	boolean found = false;
-	for (Contact tmpContact : mGroupMap.get(group)) {
-	    if (c.getJID().equals(tmpContact.getJID())) {
-		found = true;
-		break;
-	    }
+    /**
+     * Event long click on item of the contact list.
+     */
+    public class BeemContactListOnLongClick implements OnItemLongClickListener {
+	/**
+	 * Constructor.
+	 */
+	public BeemContactListOnLongClick() {
+
 	}
-	if (!found)
-	    mGroupMap.get(group).add(c);
-    }
 
-    protected void delContactInGroup(Contact c, String group) {
-	mGroupMap.get(group).remove(c);
-	c.delGroup(group);
-	if (mGroupMap.get(group).isEmpty()) {
-	    mGroupMap.remove(group);
-	    mGroupName.remove(group);
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public boolean onItemLongClick(AdapterView<?> arg0, View v, int pos, long lpos) {
+	    Contact c = mListContact.get(pos);
+	    ContactDialog dialogContact = new ContactDialog(ContactList.this, c, "MYSTATICGROUP");
+	    dialogContact.setOwnerActivity(ContactList.this);
+	    dialogContact.show();
+	    return true;
 	}
     }
 
+    /**
+     * Sort the contact list.
+     */
+    private void sortBeemContactList() {
+	Collections.sort(mListContact, new ComparatorContactListByStatusAndName<Contact>());
+    }
+
+    /**
+     * Listener on service event.
+     */
     private class BeemRosterListener extends IBeemRosterListener.Stub {
+	/**
+	 * Constructor.
+	 */
+	public BeemRosterListener() {
 
+	}
+
+	/**
+	 * Refresh the contact list.
+	 */
+	private class RunnableChange implements Runnable {
+	    /**
+	     * Constructor.
+	     */
+	    public RunnableChange() {
+
+	    }
+
+	    /**
+	     * {@inheritDoc}
+	     */
+	    @Override
+	    public void run() {
+		sortBeemContactList();
+		mAdapter.notifyDataSetChanged();
+	    }
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
 	@Override
 	public void onEntriesAdded(List<String> addresses) throws RemoteException {
-	    for (String str : addresses) {
-		Contact curContact = mRoster.getContact(str);
-		for (String group : curContact.getGroups()) {
-		    addGroup(group);
-		    addContactInGroup(curContact, group);
-		}
+	    for (String newName : addresses) {
+		Contact c = new Contact(newName);
+		mListContact.add(c);
 	    }
 	    mHandler.post(new RunnableChange());
 	}
 
+	/**
+	 * {@inheritDoc}
+	 */
 	@Override
 	public void onEntriesDeleted(List<String> addresses) throws RemoteException {
-	    for (String user : addresses) {
-		List<Contact> tmpListContact = mGroupMap.get(DEFAULT_GROUP);
-		for (Contact contact : tmpListContact) {
-		    if (contact.getJID().equals(user)) {
-			delContactInGroup(contact, DEFAULT_GROUP);
+	    for (String cToDelete : addresses) {
+		for (Contact c : mListContact) {
+		    if (c.getJID().equals(cToDelete)) {
+			mListContact.remove(c);
 			break;
 		    }
 		}
@@ -220,18 +413,23 @@
 	    mHandler.post(new RunnableChange());
 	}
 
+	/**
+	 * {@inheritDoc}
+	 */
 	@Override
 	public void onEntriesUpdated(List<String> addresses) throws RemoteException {
-	    for (String str : addresses) {
-		Contact curContact = mRoster.getContact(str);
-		for (String group : curContact.getGroups()) {
-		    addGroup(group);
-		    addContactInGroup(curContact, group);
-		}
-	    }
 	    mHandler.post(new RunnableChange());
 	}
-
+	
+	@Override
+        public void onEntryDeleteFromGroup(String group, String jid)
+                throws RemoteException {
+	    // TODO Auto-generated method stub
+	    
+        }
+	/**
+	 * {@inheritDoc}
+	 */
 	@Override
 	public void onPresenceChanged(PresenceAdapter presence) throws RemoteException {
 	    //TODO gerer la presence au niveau de chaque ressources ?
@@ -258,88 +456,63 @@
 	    }
 	}
 
-	private class RunnableChange implements Runnable {
-	    @Override
-	    public void run() {
-		mAdapter.changed();
-	    }
-	}
-
-	@Override
-	public void onEntryDeleteFromGroup(String group, String jid) throws RemoteException {
-	    for (Contact contact : mListContact) {
-		if (jid.equals(contact.getJID())) {
-		    delContactInGroup(contact, group);
-		    if (contact.getGroups().size() == 0) {
-			addGroup(DEFAULT_GROUP);
-			addContactInGroup(contact, DEFAULT_GROUP);
-		    }
-		    break;
-		}
-	    }
-	    mHandler.post(new RunnableChange());
-	}
+	
     }
 
-    private class MyExpandableListAdapter implements ExpandableListAdapter {
-
-	class MyOnClickListener implements OnClickListener {
-
-	    private final Contact mContact;
-
-	    /**
-	     * Constructor.
-	     */
-	    public MyOnClickListener(Contact contact) {
-		mContact = contact;
-	    }
-
-	    @Override
-	    public void onClick(View v) {
-		Intent i = new Intent(ContactList.this, SendIM.class);
-		i.setData(mContact.toUri());
-		startActivity(i);
-	    }
-
-	}
-
-	class MyOnLongClickListener implements OnLongClickListener {
-
-	    private final Contact mContact;
-	    private final String mGroup;
-
-	    /**
-	     * Constructor.
-	     */
-	    public MyOnLongClickListener(Contact contact, String group) {
-		mContact = contact;
-		mGroup = group;
-	    }
-
-	    /**
-	     * @{inheritDoc}
-	     */
-	    @Override
-	    public boolean onLongClick(View v) {
-		createDialog(mContact, mGroup);
-		return true;
-	    }
-	}
-
-	private final List<DataSetObserver> mObservers;
+    /**
+     * Adapter contact list.
+     */
+    private class BeemContactList extends BaseAdapter {
+	private LayoutInflater mInflater;
 
 	/**
 	 * Constructor.
+	 * @param context context activity.
 	 */
-	public MyExpandableListAdapter() {
-	    mObservers = new ArrayList<DataSetObserver>();
+	public BeemContactList(final Context context) {
+	    mInflater = LayoutInflater.from(context);
+	}
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public int getCount() {
+	    return mListContact.size();
+	}
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public Object getItem(int position) {
+	    return position;
+	}
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public long getItemId(int position) {
+	    return position;
+	}
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public View getView(int position, View convertView, ViewGroup parent) {
+	    View v = convertView;
+	    if (convertView == null) {
+		v = mInflater.inflate(R.layout.contactlistcontact, null);
+	    }
+
+	    Contact c = mListContact.get(position);
+	    bindView(v, c);
+	    return v;
 	}
 
-	@Override
-	public boolean areAllItemsEnabled() {
-	    return true;
-	}
-
+	/**
+	 * Adapte curContact to the view.
+	 * @param view the row view.
+	 * @param curContact the current contact.
+	 */
 	private void bindView(View view, Contact curContact) {
 
 	    if (curContact != null) {
@@ -387,149 +560,12 @@
 		}
 
 		/*
-		 * TODO: Rajouter l'avatar du contact getAvatar() dans la classe imgV = (ImageView)
+		 * Rajouter l'avatar du contact getAvatar() dans la classe imgV = (ImageView)
 		 * view.findViewById(R.id.contactlistavatar); if (imgV != null) { imageDrawable =
 		 * getResources().getDrawable(R.drawable.avatar); imgV.setImageDrawable(imageDrawable); }
 		 */
 	    }
 	}
-
-	public void changed() {
-	    Collections.sort(mGroupName);
-	    for (String name : mGroupName) {
-		Collections.sort(mGroupMap.get(name), new ComparatorContactListByStatusAndName<Contact>());
-	    }
-	    for (DataSetObserver obs : mObservers) {
-		obs.onChanged();
-	    }
-	}
-
-	void createDialog(Contact contact, String group) {
-	    ContactDialog dialogContact = new ContactDialog(ContactList.this, contact, group);
-	    dialogContact.setOwnerActivity(ContactList.this);
-	    dialogContact.show();
-	}
-
-	@Override
-	public Object getChild(int groupPosition, int childPosition) {
-	    try {
-		return mGroupMap.get(mGroupName.get(groupPosition)).get(childPosition);
-	    } catch (NullPointerException e) {
-		Log.e(TAG, "Child not found", e);
-		return null;
-	    }
-	}
-
-	@Override
-	public long getChildId(int groupPosition, int childPosition) {
-	    try {
-		mGroupMap.get(mGroupName.get(groupPosition)).get(childPosition);
-	    } catch (NullPointerException e) {
-		Log.e(TAG, "Child not found", e);
-		return 0;
-	    }
-	    return childPosition;
-	}
-
-	@Override
-	public int getChildrenCount(int groupPosition) {
-	    try {
-		return mGroupMap.get(mGroupName.get(groupPosition)).size();
-	    } catch (NullPointerException e) {
-		Log.e(TAG, "Child not found", e);
-		return 0;
-	    }
-	}
-
-	@Override
-	public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView,
-	    ViewGroup parent) {
-	    View v;
-	    if (convertView == null) {
-		v = LayoutInflater.from(ContactList.this).inflate(R.layout.contactlistcontact, null);
-	    } else {
-		v = convertView;
-	    }
-	    Contact contact = mGroupMap.get(mGroupName.get(groupPosition)).get(childPosition);
-	    bindView(v, contact);
-
-	    v.setOnLongClickListener(new MyOnLongClickListener(contact, mGroupName.get(groupPosition)));
-	    v.setOnClickListener(new MyOnClickListener(contact));
-	    return v;
-	}
-
-	@Override
-	public long getCombinedChildId(long groupId, long childId) {
-	    return 1000 * groupId + childId;
-	}
-
-	@Override
-	public long getCombinedGroupId(long groupId) {
-	    return 1000 * groupId;
-	}
-
-	@Override
-	public Object getGroup(int groupPosition) {
-	    try {
-		return mGroupMap.get(mGroupName.get(groupPosition));
-	    } catch (NullPointerException e) {
-		Log.e(TAG, "Group not found", e);
-		return null;
-	    }
-	}
-
-	@Override
-	public int getGroupCount() {
-	    return mGroupMap.size();
-	}
-
-	@Override
-	public long getGroupId(int groupPosition) {
-	    return groupPosition;
-	}
-
-	@Override
-	public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
-	    if (convertView == null) {
-		convertView = LayoutInflater.from(ContactList.this).inflate(R.layout.contactlistgroup, null);
-	    }
-	    TextView groupTextView = (TextView) convertView.findViewById(R.id.textgroup);
-	    groupTextView.setText(mGroupName.get(groupPosition));
-	    return convertView;
-	}
-
-	@Override
-	public boolean hasStableIds() {
-	    return false;
-	}
-
-	@Override
-	public boolean isChildSelectable(int groupPosition, int childPosition) {
-	    return true;
-	}
-
-	@Override
-	public boolean isEmpty() {
-	    return mGroupMap.isEmpty();
-	}
-
-	@Override
-	public void onGroupCollapsed(int groupPosition) {
-	}
-
-	@Override
-	public void onGroupExpanded(int groupPosition) {
-	}
-
-	@Override
-	public void registerDataSetObserver(DataSetObserver observer) {
-	    mObservers.add(observer);
-	}
-
-	@Override
-	public void unregisterDataSetObserver(DataSetObserver observer) {
-	    mObservers.remove(observer);
-	}
     }
 
     /**
@@ -541,7 +577,9 @@
 	/**
 	 * Constructor.
 	 */
-	public BeemServiceConnection() { }
+	public BeemServiceConnection() {
+	}
+
 	@Override
 	public void onServiceConnected(ComponentName name, IBinder service) {
 	    mXmppFacade = IXmppFacade.Stub.asInterface(service);
@@ -549,7 +587,7 @@
 		mRoster = mXmppFacade.getRoster();
 		if (mRoster != null) {
 		    mRoster.addRosterListener(mBeemRosterListener);
-		    buildContactList(mRoster.getContactList());
+		    buildContactList(mRoster.getContactList(), mRoster.getGroupsNames());
 		}
 	    } catch (RemoteException e) {
 		e.printStackTrace();
--- a/src/com/beem/project/beem/ui/Login.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/ui/Login.java	Thu Sep 17 17:39:05 2009 +0200
@@ -13,9 +13,9 @@
 import android.os.IBinder;
 import android.os.RemoteException;
 import android.util.Log;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -31,7 +31,7 @@
  */
 public class Login extends Activity {
 
-    //private static final String TAG = "LOG_AS";
+    // private static final String TAG = "LOG_AS";
     private static final Intent SERVICE_INTENT = new Intent();
     static {
 	SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
@@ -47,12 +47,11 @@
     private SharedPreferences mSettings;
     private boolean mIsConfigured;
 
-    private Button mButtonLogin;
-
     /**
      * Constructor.
      */
-    public Login() { }
+    public Login() {
+    }
 
     /**
      * Create an about "BEEM" dialog.
@@ -71,31 +70,13 @@
     }
 
     /**
-     * @{inheritDoc}
+     * {@inheritDoc}
      */
     @Override
     public void onCreate(Bundle savedInstanceState) {
 	super.onCreate(savedInstanceState);
 	mSettings = getSharedPreferences(getString(R.string.settings_filename), MODE_PRIVATE);
 	setContentView(R.layout.login);
-	Button button = (Button) findViewById(R.id.log_as_settings);
-	button.setOnClickListener(new OnClickListener() {
-
-	    @Override
-	    public void onClick(View v) {
-		startActivity(new Intent(Login.this, EditSettings.class));
-	    }
-
-	});
-	mButtonLogin = (Button) findViewById(R.id.log_as_login);
-	mButtonLogin.setOnClickListener(new OnClickListener() {
-
-	    @Override
-	    public void onClick(View v) {
-		bindService(Login.SERVICE_INTENT, mServConn, BIND_AUTO_CREATE);
-	    }
-
-	});
 	mProgressDialog = new ProgressDialog(this);
     }
 
@@ -113,14 +94,41 @@
     @Override
     public void onStart() {
 	super.onStart();
-	Log.e("LOGIN", "BINDSERVICE");
 	mIsConfigured = mSettings.getBoolean(getString(R.string.PreferenceIsConfigured), false);
 
 	if (mIsConfigured)
 	    bindService(Login.SERVICE_INTENT, mServConn, BIND_AUTO_CREATE);
-	else
-	    mButtonLogin.setEnabled(false);
+
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+	super.onCreateOptionsMenu(menu);
+	MenuInflater inflater = getMenuInflater();
+	inflater.inflate(R.menu.login, menu);
+	return true;
+    }
 
+    /**
+     * Callback for menu item selected.
+     * @param item the item selected
+     * @return true on success, false otherwise
+     */
+    @Override
+    public final boolean onOptionsItemSelected(MenuItem item) {
+	switch (item.getItemId()) {
+	    case R.id.login_menu_settings:
+		startActivity(new Intent(Login.this, EditSettings.class));
+		return true;
+	    case R.id.login_menu_about:
+		createAboutDialog();
+		return true;
+	    default:
+		return false;
+	}
     }
 
     /**
@@ -131,7 +139,8 @@
 	/**
 	 * Constructor.
 	 */
-	public BeemConnectionListener() { }
+	public BeemConnectionListener() {
+	}
 
 	/**
 	 * Runnable to display error message.
@@ -149,7 +158,7 @@
 	    }
 
 	    /**
-	     * @{inheritDoc}
+	     * {@inheritDoc}
 	     */
 	    @Override
 	    public void run() {
@@ -159,11 +168,10 @@
 	}
 
 	/**
-	 * @{inheritDoc}
+	 * {@inheritDoc}
 	 */
 	@Override
 	public void connectionClosed() throws RemoteException {
-	    Log.e("Login", "CONNECTIONCLOSED");
 	    mIsConnected = false;
 	    if (mXmppFacade != null) {
 		Login.this.unbindService(mServConn);
@@ -174,8 +182,6 @@
 
 	@Override
 	public void connectionClosedOnError() throws RemoteException {
-	    Log.e("Login", "CONNECTIONCLOSEONERROR");
-
 	}
 
 	@Override
@@ -194,12 +200,12 @@
 
 	/**
 	 * Show an error message with a toast.
-	 * @param errorMsg  The message to display.
+	 * @param errorMsg The message to display.
 	 */
 	private void showToast(final String errorMsg) {
 	    mConnectionHandler.post(new Runnable() {
 		/**
-		 * @{inheritDoc}
+		 * @{inheritDoc
 		 */
 		@Override
 		public void run() {
@@ -217,7 +223,7 @@
 	    mConnectionHandler.post(new Runnable() {
 
 		/**
-		 * @{inheritDoc}
+		 * @{inheritDoc
 		 */
 		@Override
 		public void run() {
@@ -262,7 +268,8 @@
 	/**
 	 * Constructor.
 	 */
-	public BeemServiceConnection() { }
+	public BeemServiceConnection() {
+	}
 
 	@Override
 	public void onServiceConnected(ComponentName name, IBinder service) {
--- a/src/com/beem/project/beem/ui/SendIM.java	Thu Sep 17 17:28:40 2009 +0200
+++ b/src/com/beem/project/beem/ui/SendIM.java	Thu Sep 17 17:39:05 2009 +0200
@@ -49,7 +49,7 @@
 public class SendIM extends Activity implements OnClickListener, OnKeyListener {
 
     private static final String TAG = "SEND_IM";
-    public IRoster mRoster;
+    private IRoster mRoster;
     private EditText mToSend;
     private SendIMDialogSmiley mSmyDialog;
     private SharedPreferences mSet;
@@ -427,7 +427,14 @@
 	    // TODO Auto-generated method stub
 
 	}
-
+	
+	@Override
+        public void onEntryDeleteFromGroup(String group, String jid)
+                throws RemoteException {
+	    // TODO Auto-generated method stub
+	    
+        }
+	
 	@Override
 	public void onPresenceChanged(PresenceAdapter presence) throws RemoteException {
 	    if (mContact.getJID().equals(StringUtils.parseBareAddress(presence.getFrom()))) {
@@ -453,11 +460,7 @@
 	    }
 	}
 
-	@Override
-	public void onEntryDeleteFromGroup(String group, String jid) throws RemoteException {
-	    // TODO Auto-generated method stub
 
-	}
 
     }