--- a/.classpath Thu Oct 08 15:00:12 2009 +0200
+++ b/.classpath Thu Oct 08 15:26:22 2009 +0200
@@ -1,34 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
- <classpathentry kind="lib" path="libs/smackx-debug.jar"/>
- <classpathentry kind="lib" path="libs/smackx-jingle.jar">
- <attributes>
- <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" path=".apt_generated">
- <attributes>
- <attribute name="optional" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="lib" path="libs/security.jar"/>
- <classpathentry kind="lib" path="libs/smack.jar" sourcepath="/home/marseille/smack_src_3_1_0/source">
- <attributes>
- <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/org/"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="lib" path="libs/smackx.jar" sourcepath="/home/nikita/devel/smack">
- <attributes>
- <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="lib" path="libs/jlibrtp.jar">
- <attributes>
- <attribute name="javadoc_location" value="file:/home/nikita/android/docs/reference/"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="com/beem/project/beem/ui/pref.java" kind="src" path="src"/>
- <classpathentry kind="src" path="gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="lib" path="libs/smackx-debug.jar"/>
+ <classpathentry kind="lib" path="libs/smackx-jingle.jar">
+ <attributes>
+ <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="libs/security.jar"/>
+ <classpathentry kind="lib" path="libs/smack.jar" sourcepath="/home/marseille/smack_src_3_1_0/source">
+ <attributes>
+ <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/org/"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="libs/smackx.jar" sourcepath="/home/nikita/devel/smack">
+ <attributes>
+ <attribute name="javadoc_location" value="file:/home/nikita/devel/smack_src_3_1_0/javadoc/"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="lib" path="libs/jlibrtp.jar">
+ <attributes>
+ <attribute name="javadoc_location" value="file:/home/nikita/android/docs/reference/"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="com/beem/project/beem/ui/pref.java" kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- a/AndroidManifest.xml Thu Oct 08 15:00:12 2009 +0200
+++ b/AndroidManifest.xml Thu Oct 08 15:26:22 2009 +0200
@@ -87,6 +87,6 @@
<uses-permission android:name="android.permission.VIBRATE"></uses-permission>
<uses-permission android:name="com.beem.project.beem.BEEM_SERVICE"></uses-permission>
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"></uses-permission>
- <uses-sdk android:minSdkVersion="3"></uses-sdk>
+ <uses-sdk android:minSdkVersion="4"></uses-sdk>
</manifest>
--- a/Beem-ecipse-formatter.xml Thu Oct 08 15:00:12 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,267 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<profiles version="11">
-<profile kind="CodeFormatterProfile" name="Eclipse [good tabsize]" version="11">
-<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
-<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
-<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
-<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="mixed"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="8"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
-<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
-<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
-<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/>
-<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
-<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
-</profile>
-</profiles>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/eclipse_formatter.xml Thu Oct 08 15:26:22 2009 +0200
@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<profiles version="11">
+<profile kind="CodeFormatterProfile" name="Eclipse [good tabsize]" version="11">
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.compiler.source" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="mixed"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="8"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.5"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+</profile>
+</profiles>
--- a/res/values Thu Oct 08 15:00:12 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-values-en
\ No newline at end of file
--- a/src/com/beem/project/beem/jingle/JingleService.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/jingle/JingleService.java Thu Oct 08 15:26:22 2009 +0200
@@ -5,6 +5,7 @@
import java.util.ArrayList;
import java.util.List;
+
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smackx.jingle.JingleManager;
@@ -26,7 +27,7 @@
public class JingleService {
private static final String TAG = "JingleService";
private JingleManager mJingleManager;
- private List<JingleMediaManager> mMediaManagers;
+ private final List<JingleMediaManager> mMediaManagers;
private JingleSession mIn;
private JingleSession mOut;
@@ -36,7 +37,7 @@
*/
public JingleService(final XMPPConnection xmppConnection) {
BasicTransportManager bt = new BasicTransportManager();
- //JingleTransportManager tm = new ICETransportManager();
+ // JingleTransportManager tm = new ICETransportManager();
mMediaManagers = new ArrayList<JingleMediaManager>();
mMediaManagers.add(new MicrophoneRTPManager(bt));
@@ -89,13 +90,15 @@
@Override
public void sessionClosed(String reason, JingleSession jingleSession) {
- //System.out.println("Session " + jingleSession.getResponder() + "closedd because " + reason);
+ // System.out.println("Session " + jingleSession.getResponder() +
+ // "closedd because " + reason);
}
@Override
public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {
// TODO Auto-generated method stub
- // System.out.println("Session " + jingleSession.getResponder() + " closed");
+ // System.out.println("Session " + jingleSession.getResponder() +
+ // " closed");
}
@@ -107,16 +110,18 @@
@Override
public void sessionEstablished(PayloadType pt, TransportCandidate remoteCandidate,
TransportCandidate localCandidate, JingleSession jingleSession) {
- //System.out.println("Session established");
- //System.out.println("Je recois sur " + remoteCandidate.getIp() + ":" + remoteCandidate.getPort());
+ // System.out.println("Session established");
+ // System.out.println("Je recois sur " + remoteCandidate.getIp() +
+ // ":" + remoteCandidate.getPort());
// TODO choose the right RTPReceiver depending on the payload type
- //RTPReceiver rtpReceiver = new RTPReceiver(remoteCandidate.getPort());
+ // RTPReceiver rtpReceiver = new
+ // RTPReceiver(remoteCandidate.getPort());
Log.d(TAG, "Session " + jingleSession.getResponder() + "established");
}
@Override
public void sessionMediaReceived(JingleSession jingleSession, String participant) {
- //System.out.println("Session Media received from " + participant);
+ // System.out.println("Session Media received from " + participant);
}
@Override
@@ -130,6 +135,8 @@
*/
private class BeemJingleCallerSessionListener implements JingleSessionListener {
+ private static final int SLP_DURATION = 20000;
+
/**
* constructor.
*/
@@ -140,18 +147,21 @@
@Override
public void sessionClosed(final String reason, final JingleSession jingleSession) {
- // System.out.println("Session " + jingleSession.getResponder() + "closed because " + reason);
+ // System.out.println("Session " + jingleSession.getResponder() +
+ // "closed because " + reason);
}
@Override
public void sessionClosedOnError(final XMPPException e, final JingleSession jingleSession) {
- // System.out.println("Session " + jingleSession.getResponder() + " closed on error");
+ // System.out.println("Session " + jingleSession.getResponder() +
+ // " closed on error");
}
@Override
public void sessionDeclined(final String reason, final JingleSession jingleSession) {
- // System.out.println("Session " + jingleSession.getResponder() + "declined because " + reason);
+ // System.out.println("Session " + jingleSession.getResponder() +
+ // "declined because " + reason);
Log.d(TAG, "Session " + jingleSession.getResponder() + "declined because " + reason);
}
@@ -162,19 +172,20 @@
// String name = localCandidate.getName();
String ip = localCandidate.getIp();
int port = localCandidate.getPort();
- // System.out.println("Session established waiting connection on " + ip + ":" + port);
+ // System.out.println("Session established waiting connection on " +
+ // ip + ":" + port);
RTPTransmitter transm = new PCMTransmitter(ip, port);
transm.run();
try {
- Thread.sleep(20000);
+ Thread.sleep(SLP_DURATION);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
transm.stop();
- // System.out.println("End of transfer");
+ // System.out.println("End of transfer");
}
--- a/src/com/beem/project/beem/jingle/MicrophoneRTPSession.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/jingle/MicrophoneRTPSession.java Thu Oct 08 15:26:22 2009 +0200
@@ -23,12 +23,13 @@
* @param jingleSession the current jingle session
*/
public MicrophoneRTPSession(final PayloadType payloadType, final TransportCandidate remote,
- final TransportCandidate local, final String mediaLocator, final JingleSession jingleSession) {
+ final TransportCandidate local, final String mediaLocator, final JingleSession jingleSession) {
super(payloadType, remote, local, mediaLocator, jingleSession);
- // TODO le transmitter ne devrait peut etre pas etre init ici, c'est peut etre encore un peu tot, a voir.
+ // TODO le transmitter ne devrait peut etre pas etre init ici, c'est
+ // peut etre encore un peu tot, a voir.
mTransmitter = new PCMTransmitter(remote.getIp(), getRemote().getPort());
- //mReceiver = new MicroRTPReceiver(getLocal().getPort());
+ // mReceiver = new MicroRTPReceiver(getLocal().getPort());
}
@Override
--- a/src/com/beem/project/beem/jingle/PCMTransmitter.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/jingle/PCMTransmitter.java Thu Oct 08 15:26:22 2009 +0200
@@ -10,6 +10,10 @@
*/
public class PCMTransmitter extends RTPTransmitter {
+ private static final int BUFF_SIZE = 1024;
+ private static final int RATE_IN_HZ = 8000;
+ private static final int SLP_DURATION = 200;
+
/**
* Constructor.
* @param remoteIP receiver IP.
@@ -21,18 +25,18 @@
@Override
void start() {
- AudioRecord audRec = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, 8000,
- AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT, AudioRecord.getMinBufferSize(8000,
- AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT));
- byte[] audioData = new byte[1024];
+ AudioRecord audRec = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, RATE_IN_HZ,
+ AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT, AudioRecord.getMinBufferSize(
+ RATE_IN_HZ, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT));
+ byte[] audioData = new byte[BUFF_SIZE];
int byteReaded = 0;
while (!isKillme()) {
- byteReaded = audRec.read(audioData, byteReaded, 1024);
+ byteReaded = audRec.read(audioData, byteReaded, BUFF_SIZE);
System.out.println("readed " + byteReaded);
getRtpSession().sendData(audioData);
}
try {
- Thread.sleep(200);
+ Thread.sleep(SLP_DURATION);
} catch (InterruptedException e) {
e.printStackTrace();
}
--- a/src/com/beem/project/beem/jingle/RTPReceiver.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/jingle/RTPReceiver.java Thu Oct 08 15:26:22 2009 +0200
@@ -10,7 +10,6 @@
/**
* abstract RTP receiver class.
* @author nikita
- *
*/
public abstract class RTPReceiver implements Runnable, RTPAppIntf {
--- a/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Thu Oct 08 15:26:22 2009 +0200
@@ -23,6 +23,9 @@
*/
public class JingleCallActivity extends Activity {
+ private static final int SLP_DURATION = 3000;
+ private static final int DEFAULT_XMPP_PORT = 5222;
+
private XMPPConnection mConnection;
private ConnectionConfiguration mConf;
private JingleService mJingle;
@@ -45,7 +48,7 @@
super.onCreate(savedInstanceState);
setContentView(R.layout.jingle_call_activity);
// localhost mConf = new ConnectionConfiguration("10.0.2.2", 5222);
- mConf = new ConnectionConfiguration("elyzion.net", 5222);
+ mConf = new ConnectionConfiguration("elyzion.net", DEFAULT_XMPP_PORT);
mConf.setSecurityMode(SecurityMode.required);
mEdJID = (EditText) findViewById(R.id.jingledemocalljid);
mEdPassword = (EditText) findViewById(R.id.jingledemocallpassword);
@@ -61,16 +64,16 @@
String password = mEdPassword.getText().toString();
try {
mConnection.connect();
- Thread.sleep(3000);
- mConnection.login(login, password);
- mJingle = new JingleService(mConnection);
- mJingle.initWhenConntected(mConnection);
- mBtcall.setEnabled(true);
- Toast.makeText(JingleCallActivity.this, "Connected", Toast.LENGTH_SHORT);
- } catch (XMPPException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (InterruptedException e) {
+ Thread.sleep(SLP_DURATION);
+ mConnection.login(login, password);
+ mJingle = new JingleService(mConnection);
+ mJingle.initWhenConntected(mConnection);
+ mBtcall.setEnabled(true);
+ Toast.makeText(JingleCallActivity.this, "Connected", Toast.LENGTH_SHORT);
+ } catch (XMPPException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
@@ -87,7 +90,7 @@
Toast.makeText(JingleCallActivity.this, "Appel en cours", Toast.LENGTH_SHORT);
} else
Toast.makeText(JingleCallActivity.this, "Remplir le champ (JID complet en toto@tutu.com/truc)",
- Toast.LENGTH_SHORT);
+ Toast.LENGTH_SHORT);
}
});
--- a/src/com/beem/project/beem/jingle/demo/package-info.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/jingle/demo/package-info.java Thu Oct 08 15:26:22 2009 +0200
@@ -2,3 +2,4 @@
* Package for testing the Jingle classes.
*/
package com.beem.project.beem.jingle.demo;
+
--- a/src/com/beem/project/beem/jingle/package-info.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/jingle/package-info.java Thu Oct 08 15:26:22 2009 +0200
@@ -2,3 +2,4 @@
* This package contains the class used by the Beem Jingle process.
*/
package com.beem.project.beem.jingle;
+
--- a/src/com/beem/project/beem/package-info.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/package-info.java Thu Oct 08 15:26:22 2009 +0200
@@ -2,3 +2,4 @@
* This package contains the main class for the Beem application.
*/
package com.beem.project.beem;
+
--- a/src/com/beem/project/beem/provider/Beem.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/provider/Beem.java Thu Oct 08 15:26:22 2009 +0200
@@ -4,165 +4,186 @@
import android.provider.BaseColumns;
/**
- * Convenience definitions for BEEM's providers
+ * Convenience definitions for BEEM's providers.
*/
public final class Beem {
/**
- * Contacts table
+ * Contacts table.
*/
public static final class Contacts implements BaseColumns {
/**
- * The query used to create the table
+ * 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"
- + ");";
+ public static final 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" + ");";
/**
- * The content:// style URL for Contacts table
+ * The content:// style URL for Contacts table.
*/
- public final static Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/contacts");
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/contacts");
/**
* The MIME type of {@link #CONTENT_URI} providing a directory of contacts.
*/
- public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.beem.project.contact";
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.beem.project.contact";
/**
* The MIME type of a {@link #CONTENT_URI} sub-directory of a single contact.
*/
- public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.beem.project.contact";
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.beem.project.contact";
/**
- * The default sort order for this table
+ * The default sort order for this table.
*/
- public final static String DEFAULT_SORT_ORDER = "nickname ASC";
+ public static final String DEFAULT_SORT_ORDER = "nickname ASC";
/**
* The user id having the contact
* <P>
* Type: INTEGER
* </P>
+ * .
*/
- public final static String UID = "uid";
+ public static final String UID = "uid";
/**
* The JabberID of the contact
* <P>
* Type: INTEGER
* </P>
+ * .
*/
- public final static String JID = "jid";
+ public static final String JID = "jid";
/**
* The nickname of the contact
* <P>
* Type: TEXT
* </P>
+ * .
*/
- public final static String NICKNAME = "nickname";
+ public static final String NICKNAME = "nickname";
/**
* The alias of the contact
* <P>
* Type: TEXT
* </P>
+ * .
*/
- public final static String ALIAS = "alias";
+ public static final String ALIAS = "alias";
/**
* The timestamp for when the contact was created
* <P>
* Type: INTEGER (long from System.curentTimeMillis())
* </P>
+ * .
*/
- public final static String DATE_CREATED = "created";
+ public static final String DATE_CREATED = "created";
/**
* The timestamp for when the contact was last modified
* <P>
* Type: INTEGER (long from System.curentTimeMillis())
* </P>
+ * .
*/
- public final static String DATE_MODIFIED = "modified";
+ public static final String DATE_MODIFIED = "modified";
}
/**
- * Users table
+ * Users table.
*/
public static final class Users implements BaseColumns {
/**
- * The query used to create the table
+ * 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" + ");";
+ public static final 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" + ");";
/**
- * The content:// style URL for Contacts table
+ * The content:// style URL for Contacts table.
*/
- public final static Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/users");
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/users");
/**
* The MIME type of {@link #CONTENT_URI} providing a directory of users.
*/
- public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.beem.project.user";
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.beem.project.user";
/**
* The MIME type of a {@link #CONTENT_URI} sub-directory of a single user.
*/
- public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.beem.project.user";
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.beem.project.user";
/**
- * The default sort order for this table
+ * The default sort order for this table.
*/
- public final static String DEFAULT_SORT_ORDER = "_id ASC";
+ public static final String DEFAULT_SORT_ORDER = "_id ASC";
/**
* The Jabber username of the user
* <P>
* Type: TEXT
* </P>
+ * .
*/
- public final static String JUSERNAME = "username";
+ public static final String JUSERNAME = "username";
/**
* The timestamp for when the user was created
* <P>
* Type: INTEGER (long from System.curentTimeMillis())
* </P>
+ * .
*/
- public final static String DATE_CREATED = "created";
+ public static final String DATE_CREATED = "created";
/**
* The timestamp for when the user was last modified
* <P>
* Type: INTEGER (long from System.curentTimeMillis())
* </P>
+ * .
*/
- public final static String DATE_MODIFIED = "modified";
+ public static final String DATE_MODIFIED = "modified";
}
- public final static String AUTHORITY = "com.beem.project.provider";
+ /**
+ * AUTHORITY.
+ */
+ public static final String AUTHORITY = "com.beem.project.provider";
- public final static String DB_NAME = "beem.db";
- public final static int DB_VERSION = 2;
-
- public final static String USERS_TABLE_NAME = "users";
-
- public final static String CONTACTS_TABLE_NAME = "contacts";
+ /**
+ * DB Name.
+ */
+ public static final String DB_NAME = "beem.db";
/**
- * Constructor
+ * DB Version.
+ */
+ public static final int DB_VERSION = 2;
+
+ /**
+ * Name of the users table.
+ */
+ public static final String USERS_TABLE_NAME = "users";
+
+ /**
+ * Name of the contacts table.
+ */
+ public static final String CONTACTS_TABLE_NAME = "contacts";
+
+ /**
+ * Constructor.
*/
private Beem() {
}
--- a/src/com/beem/project/beem/provider/BeemDatabaseHelper.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/provider/BeemDatabaseHelper.java Thu Oct 08 15:26:22 2009 +0200
@@ -5,13 +5,25 @@
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
+/**
+ * BeemDatabaseHelper class.
+ * @author Jamu
+ */
public class BeemDatabaseHelper extends SQLiteOpenHelper {
- private String mTag;
- private String mTableName;
- private String mCreationQuery;
+ private final String mTag;
+ private final String mTableName;
+ private final String mCreationQuery;
- public BeemDatabaseHelper(Context context, String tag, String tableName, String creationQuery) {
+ /**
+ * BeemDatabaseHelper class.
+ * @param context the context.
+ * @param tag the tag.
+ * @param tableName the tableName.
+ * @param creationQuery the creation query.
+ */
+ public BeemDatabaseHelper(final Context context, final String tag, final String tableName,
+ final String creationQuery) {
super(context, Beem.DB_NAME, null, Beem.DB_VERSION);
this.mTag = tag;
--- a/src/com/beem/project/beem/provider/ContactProvider.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/provider/ContactProvider.java Thu Oct 08 15:26:22 2009 +0200
@@ -1,6 +1,3 @@
-/**
- *
- */
package com.beem.project.beem.provider;
import java.util.HashMap;
@@ -18,22 +15,23 @@
import android.text.TextUtils;
/**
+ * ContactProvider class.
* @author dasilvj
*/
public class ContactProvider extends ContentProvider {
- private final static String TAG = "ContactProvider";
+ private static final String TAG = "ContactProvider";
private static HashMap<String, String> sContactsProjectionMap;
- private static final int CONTACTS = 1;
- private static final int CONTACT_ID = 2;
+ private static final int CONTACTS = 1;
+ private static final int CONTACT_ID = 2;
- private static final UriMatcher sUriMatcher;
+ private static final UriMatcher S_URI_MATCHER;
static {
- sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
- sUriMatcher.addURI(Beem.AUTHORITY, "contacts", CONTACTS);
- sUriMatcher.addURI(Beem.AUTHORITY, "contacts/#", CONTACT_ID);
+ S_URI_MATCHER = new UriMatcher(UriMatcher.NO_MATCH);
+ S_URI_MATCHER.addURI(Beem.AUTHORITY, "contacts", CONTACTS);
+ S_URI_MATCHER.addURI(Beem.AUTHORITY, "contacts/#", CONTACT_ID);
sContactsProjectionMap = new HashMap<String, String>();
sContactsProjectionMap.put(BaseColumns._ID, BaseColumns._ID);
@@ -45,14 +43,14 @@
sContactsProjectionMap.put(Beem.Contacts.DATE_MODIFIED, Beem.Contacts.DATE_MODIFIED);
}
- private BeemDatabaseHelper mOpenHelper;
+ private BeemDatabaseHelper mOpenHelper;
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
int count;
- switch (sUriMatcher.match(uri)) {
+ switch (S_URI_MATCHER.match(uri)) {
case CONTACTS:
count = db.delete(Beem.CONTACTS_TABLE_NAME, selection, selectionArgs);
break;
@@ -73,7 +71,7 @@
@Override
public String getType(Uri uri) {
- switch (sUriMatcher.match(uri)) {
+ switch (S_URI_MATCHER.match(uri)) {
case CONTACTS:
return Beem.Contacts.CONTENT_TYPE;
@@ -88,7 +86,7 @@
@Override
public Uri insert(Uri uri, ContentValues initialValues) {
// Validate the requested uri
- if (sUriMatcher.match(uri) != CONTACTS) {
+ if (S_URI_MATCHER.match(uri) != CONTACTS) {
throw new IllegalArgumentException("Unknown URI " + uri);
}
@@ -102,28 +100,28 @@
Long now = Long.valueOf(System.currentTimeMillis());
// Make sure that the fields are all set
- if (values.containsKey(Beem.Contacts.UID) == false) {
+ if (!values.containsKey(Beem.Contacts.UID)) {
// TODO :: Must check that the UID exists using UserProvider
throw new SQLException("No UID specified. Failed to insert row into " + uri);
}
- if (values.containsKey(Beem.Contacts.JID) == false) {
+ if (!values.containsKey(Beem.Contacts.JID)) {
values.put(Beem.Contacts.JID, "");
}
- if (values.containsKey(Beem.Contacts.NICKNAME) == false) {
+ if (!values.containsKey(Beem.Contacts.NICKNAME)) {
values.put(Beem.Contacts.JID, "");
}
- if (values.containsKey(Beem.Contacts.ALIAS) == false) {
+ if (!values.containsKey(Beem.Contacts.ALIAS)) {
values.put(Beem.Contacts.JID, "");
}
- if (values.containsKey(Beem.Contacts.DATE_CREATED) == false) {
+ if (!values.containsKey(Beem.Contacts.DATE_CREATED)) {
values.put(Beem.Contacts.DATE_CREATED, now);
}
- if (values.containsKey(Beem.Contacts.DATE_MODIFIED) == false) {
+ if (!values.containsKey(Beem.Contacts.DATE_MODIFIED)) {
values.put(Beem.Contacts.DATE_MODIFIED, now);
}
@@ -148,7 +146,7 @@
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
- switch (sUriMatcher.match(uri)) {
+ switch (S_URI_MATCHER.match(uri)) {
case CONTACTS:
qb.setTables(Beem.CONTACTS_TABLE_NAME);
qb.setProjectionMap(sContactsProjectionMap);
@@ -176,7 +174,8 @@
SQLiteDatabase db = mOpenHelper.getReadableDatabase();
Cursor c = qb.query(db, projection, selection, selectionArgs, null, null, orderBy);
- // Tell the cursor what uri to watch, so it knows when its source data changes
+ // Tell the cursor what uri to watch, so it knows when its source data
+ // changes
c.setNotificationUri(getContext().getContentResolver(), uri);
return c;
}
@@ -186,7 +185,7 @@
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
int count;
- switch (sUriMatcher.match(uri)) {
+ switch (S_URI_MATCHER.match(uri)) {
case CONTACTS:
count = db.update(Beem.CONTACTS_TABLE_NAME, values, selection, selectionArgs);
break;
--- a/src/com/beem/project/beem/provider/UserProvider.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/provider/UserProvider.java Thu Oct 08 15:26:22 2009 +0200
@@ -14,20 +14,24 @@
import android.provider.BaseColumns;
import android.text.TextUtils;
+/**
+ * UserProvider class.
+ * @author Jamu
+ */
public class UserProvider extends ContentProvider {
- private final static String TAG = "UserProvider";
+ private static final String TAG = "UserProvider";
private static HashMap<String, String> sUsersProjectionMap;
- private static final int USERS = 1;
- private static final int USER_ID = 2;
+ private static final int USERS = 1;
+ private static final int USER_ID = 2;
- private static final UriMatcher sUriMatcher;
+ private static final UriMatcher S_URI_MATCHER;
static {
- sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
- sUriMatcher.addURI(Beem.AUTHORITY, "users", USERS);
- sUriMatcher.addURI(Beem.AUTHORITY, "users/#", USER_ID);
+ S_URI_MATCHER = new UriMatcher(UriMatcher.NO_MATCH);
+ S_URI_MATCHER.addURI(Beem.AUTHORITY, "users", USERS);
+ S_URI_MATCHER.addURI(Beem.AUTHORITY, "users/#", USER_ID);
sUsersProjectionMap = new HashMap<String, String>();
sUsersProjectionMap.put(BaseColumns._ID, BaseColumns._ID);
@@ -36,14 +40,14 @@
sUsersProjectionMap.put(Beem.Users.DATE_MODIFIED, Beem.Users.DATE_MODIFIED);
}
- private BeemDatabaseHelper mOpenHelper;
+ private BeemDatabaseHelper mOpenHelper;
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
int count;
- switch (sUriMatcher.match(uri)) {
+ switch (S_URI_MATCHER.match(uri)) {
case USERS:
count = db.delete(Beem.USERS_TABLE_NAME, selection, selectionArgs);
break;
@@ -64,7 +68,7 @@
@Override
public String getType(Uri uri) {
- switch (sUriMatcher.match(uri)) {
+ switch (S_URI_MATCHER.match(uri)) {
case USERS:
return Beem.Users.CONTENT_TYPE;
@@ -79,7 +83,7 @@
@Override
public Uri insert(Uri uri, ContentValues initialValues) {
// Validate the requested uri
- if (sUriMatcher.match(uri) != USERS) {
+ if (S_URI_MATCHER.match(uri) != USERS) {
throw new IllegalArgumentException("Unknown URI " + uri);
}
@@ -93,15 +97,15 @@
Long now = Long.valueOf(System.currentTimeMillis());
// Make sure that the fields are all set
- if (values.containsKey(Beem.Users.JUSERNAME) == false) {
+ if (!values.containsKey(Beem.Users.JUSERNAME)) {
throw new SQLException("No JUSERNAME specified. Failed to insert row into " + uri);
}
- if (values.containsKey(Beem.Users.DATE_CREATED) == false) {
+ if (!values.containsKey(Beem.Users.DATE_CREATED)) {
values.put(Beem.Users.DATE_CREATED, now);
}
- if (values.containsKey(Beem.Users.DATE_MODIFIED) == false) {
+ if (!values.containsKey(Beem.Users.DATE_MODIFIED)) {
values.put(Beem.Users.DATE_MODIFIED, now);
}
@@ -126,7 +130,7 @@
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
SQLiteQueryBuilder qb = new SQLiteQueryBuilder();
- switch (sUriMatcher.match(uri)) {
+ switch (S_URI_MATCHER.match(uri)) {
case USERS:
qb.setTables(Beem.USERS_TABLE_NAME);
qb.setProjectionMap(sUsersProjectionMap);
@@ -154,7 +158,8 @@
SQLiteDatabase db = mOpenHelper.getReadableDatabase();
Cursor c = qb.query(db, projection, selection, selectionArgs, null, null, orderBy);
- // Tell the cursor what uri to watch, so it knows when its source data changes
+ // Tell the cursor what uri to watch, so it knows when its source data
+ // changes
c.setNotificationUri(getContext().getContentResolver(), uri);
return c;
}
@@ -164,7 +169,7 @@
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
int count;
- switch (sUriMatcher.match(uri)) {
+ switch (S_URI_MATCHER.match(uri)) {
case USERS:
count = db.update(Beem.USERS_TABLE_NAME, values, selection, selectionArgs);
break;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/provider/package-info.java Thu Oct 08 15:26:22 2009 +0200
@@ -0,0 +1,5 @@
+/**
+ * This package contains the class concerning the providers of Beem.
+ */
+package com.beem.project.beem.provider;
+
--- a/src/com/beem/project/beem/service/BeemChatManager.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/service/BeemChatManager.java Thu Oct 08 15:26:22 2009 +0200
@@ -29,14 +29,12 @@
/**
* An adapter for smack's ChatManager. This class provides functionnality to handle chats.
- *
* @author darisk
*/
public class BeemChatManager extends IChatManager.Stub {
/**
* A listener for all the chat creation event that happens on the connection.
- *
* @author darisk
*/
private class ChatListener implements ChatStateListener, ChatManagerListener, MessageListener {
@@ -71,22 +69,20 @@
/**
* Set a notification of a new chat in android.
- *
- * @param chat
- * The chat to access by the notification
+ * @param chat The chat to access by the notification
*/
private void notifyNewChat(IChat chat) {
try {
String text = chat.getParticipant().getJID();
Notification notif = new Notification(com.beem.project.beem.R.drawable.notify_message, text, System
- .currentTimeMillis());
+ .currentTimeMillis());
notif.defaults = Notification.DEFAULT_ALL;
notif.flags = Notification.FLAG_AUTO_CANCEL;
Intent intent = new Intent(mService, SendIM.class);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.setData(chat.getParticipant().toUri());
notif.setLatestEventInfo(mService, text, mService.getString(R.string.BeemChatManagerNewMessage),
- PendingIntent.getActivity(mService, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT));
+ PendingIntent.getActivity(mService, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT));
int id = chat.hashCode();
mService.sendNotification(id, notif);
} catch (RemoteException e) {
@@ -151,20 +147,15 @@
private final ChatManager mAdaptee;
private final Map<String, ChatAdapter> mChats = new HashMap<String, ChatAdapter>();
private final ChatListener mChatListener = new ChatListener();
- private final RemoteCallbackList<IChatManagerListener> mRemoteChatCreationListeners
- = new RemoteCallbackList<IChatManagerListener>();
- private final RemoteCallbackList<IMessageListener> mRemoteMessageListeners
- = new RemoteCallbackList<IMessageListener>();
+ private final RemoteCallbackList<IChatManagerListener> mRemoteChatCreationListeners = new RemoteCallbackList<IChatManagerListener>();
+ private final RemoteCallbackList<IMessageListener> mRemoteMessageListeners = new RemoteCallbackList<IMessageListener>();
private final BeemService mService;
/**
* Constructor.
- *
- * @param chatManager
- * the smack ChatManager to adapt
- * @param service
- * the service which runs the chat manager
+ * @param chatManager the smack ChatManager to adapt
+ * @param service the service which runs the chat manager
*/
public BeemChatManager(final ChatManager chatManager, final BeemService service) {
mService = service;
@@ -182,11 +173,8 @@
/**
* Create a chat session.
- *
- * @param contact
- * the contact you want to chat with
- * @param listener
- * listener to use for chat events on this chat session
+ * @param contact the contact you want to chat with
+ * @param listener listener to use for chat events on this chat session
* @return the chat session
*/
public IChat createChat(Contact contact, IMessageListener listener) {
@@ -196,11 +184,8 @@
/**
* Create a chat session.
- *
- * @param jid
- * the jid of the contact you want to chat with
- * @param listener
- * listener to use for chat events on this chat session
+ * @param jid the jid of the contact you want to chat with
+ * @param listener listener to use for chat events on this chat session
* @return the chat session
*/
public IChat createChat(String jid, IMessageListener listener) {
@@ -233,9 +218,7 @@
/**
* Get an existing ChatAdapter or create it if necessary.
- *
- * @param chat
- * The real instance of smack chat
+ * @param chat The real instance of smack chat
* @return a chat adapter register in the manager
*/
private ChatAdapter getChat(Chat chat) {
--- a/src/com/beem/project/beem/service/ChatAdapter.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/service/ChatAdapter.java Thu Oct 08 15:26:22 2009 +0200
@@ -16,11 +16,13 @@
* @author darisk
*/
public class ChatAdapter extends IChat.Stub {
- private Chat mAdaptee;
- private Contact mParticipant;
+ private final Chat mAdaptee;
+ private final Contact mParticipant;
private String mState;
private boolean mIsOpen;
- private List<Message> mMessages;
+ private final List<Message> mMessages;
+
+ private static final int HISTORY_MAX_SIZE = 50;
/**
* Constructor.
@@ -115,7 +117,7 @@
* @param msg the message to add
*/
void addMessage(Message msg) {
- if (mMessages.size() == 50)
+ if (mMessages.size() == HISTORY_MAX_SIZE)
mMessages.remove(0);
mMessages.add(msg);
}
--- a/src/com/beem/project/beem/service/Contact.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/service/Contact.java Thu Oct 08 15:26:22 2009 +0200
@@ -52,8 +52,7 @@
/**
* 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();
@@ -69,8 +68,7 @@
/**
* Constructor.
- * @param jid
- * JID of the contact
+ * @param jid JID of the contact
*/
public Contact(final String jid) {
mJID = StringUtils.parseBareAddress(jid);
@@ -85,10 +83,8 @@
/**
* Create a contact from a Uri.
- * @param uri
- * an uri for the contact
- * @throws IllegalArgumentException
- * if it is not a xmpp uri
+ * @param uri an uri for the contact
+ * @throws IllegalArgumentException if it is not a xmpp uri
*/
public Contact(final Uri uri) {
if (!"xmpp".equals(uri.getScheme()))
@@ -104,8 +100,7 @@
/**
* Add a group for the contact.
- * @param group
- * the group
+ * @param group the group
*/
public void addGroup(String group) {
if (!mGroups.contains(group))
@@ -122,8 +117,7 @@
/**
* Add a resource for this contact.
- * @param res
- * the resource to add
+ * @param res the resource to add
*/
public void addRes(String res) {
if (!mRes.contains(res))
@@ -132,8 +126,7 @@
/**
* Delete a resource for this contact.
- * @param res
- * the resource de delete
+ * @param res the resource de delete
*/
public void delRes(String res) {
mRes.remove(res);
@@ -206,8 +199,7 @@
/**
* Set the groups the contact is in.
- * @param groups
- * list of groups
+ * @param groups list of groups
*/
public void setGroups(Collection<RosterGroup> groups) {
this.mGroups.clear();
@@ -218,8 +210,7 @@
/**
* Set the groups the contact is in.
- * @param groups
- * the mGroups to set
+ * @param groups the mGroups to set
*/
public void setGroups(List<String> groups) {
this.mGroups = groups;
@@ -227,8 +218,7 @@
/**
* set the id of te contact on the phone contact list.
- * @param mid
- * the mID to set
+ * @param mid the mID to set
*/
public void setID(int mid) {
mID = mid;
@@ -236,8 +226,7 @@
/**
* Set the Jabber ID of the contact.
- * @param jid
- * the jabber ID to set
+ * @param jid the jabber ID to set
*/
public void setJID(String jid) {
mJID = jid;
@@ -245,8 +234,7 @@
/**
* Set a list of resource for the contact.
- * @param mRes
- * the mRes to set
+ * @param mRes the mRes to set
*/
public void setMRes(List<String> mRes) {
this.mRes = mRes;
@@ -254,8 +242,7 @@
/**
* Set the message status of the contact.
- * @param msgState
- * the message status of the contact to set
+ * @param msgState the message status of the contact to set
*/
public void setMsgState(String msgState) {
mMsgState = msgState;
@@ -263,8 +250,7 @@
/**
* Set the name of the contact.
- * @param name
- * the mName to set
+ * @param name the mName to set
*/
public void setName(String name) {
if (name != null)
@@ -273,8 +259,7 @@
/**
* Set the status of the contact.
- * @param status
- * the mStatus to set
+ * @param status the mStatus to set
*/
public void setStatus(int status) {
mStatus = status;
@@ -282,8 +267,7 @@
/**
* Set the status of the contact using a presence packet.
- * @param presence
- * the presence containing status
+ * @param presence the presence containing status
*/
public void setStatus(Presence presence) {
mStatus = Status.getStatusFromPresence(presence);
@@ -292,8 +276,7 @@
/**
* Set status for the contact.
- * @param presence
- * The presence packet which contains the status
+ * @param presence The presence packet which contains the status
*/
public void setStatus(PresenceAdapter presence) {
mStatus = presence.getStatus();
--- a/src/com/beem/project/beem/service/Message.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/service/Message.java Thu Oct 08 15:26:22 2009 +0200
@@ -53,9 +53,9 @@
private String mTo;
private String mFrom;
private String mThread;
+
// TODO ajouter l'erreur
-
/**
* Constructor.
* @param to the destinataire of the message
@@ -95,7 +95,8 @@
mType = MSG_TYPE_NORMAL;
break;
// TODO gerer les message de type error
- // this a little work around waiting for a better handling of error messages
+ // this a little work around waiting for a better handling of error
+ // messages
case error:
mType = MSG_TYPE_ERROR;
break;
--- a/src/com/beem/project/beem/service/PresenceAdapter.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/service/PresenceAdapter.java Thu Oct 08 15:26:22 2009 +0200
@@ -20,8 +20,7 @@
public static final Parcelable.Creator<PresenceAdapter> CREATOR = new Parcelable.Creator<PresenceAdapter>() {
@Override
- public PresenceAdapter createFromParcel(
- Parcel source) {
+ public PresenceAdapter createFromParcel(Parcel source) {
return new PresenceAdapter(source);
}
@@ -31,12 +30,11 @@
}
};
- private int mType;
- private int mStatus;
- private String mTo;
- private String mFrom;
- private String mStatusText;
-
+ private int mType;
+ private int mStatus;
+ private String mTo;
+ private String mFrom;
+ private String mStatusText;
/**
* constructor from Parcel.
--- a/src/com/beem/project/beem/service/RosterAdapter.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/service/RosterAdapter.java Thu Oct 08 15:26:22 2009 +0200
@@ -162,7 +162,7 @@
public PresenceAdapter getPresence(String jid) throws RemoteException {
return new PresenceAdapter(mAdaptee.getPresence(jid));
}
-
+
@Override
public void addContactToGroup(String groupName, String jid) throws RemoteException {
createGroup(groupName);
@@ -171,9 +171,9 @@
group.addEntry(mAdaptee.getEntry(jid));
} catch (XMPPException e) {
e.printStackTrace();
- }
+ }
}
-
+
@Override
public void removeContactFromGroup(String groupName, String jid) throws RemoteException {
RosterGroup group = mAdaptee.getGroup(groupName);
@@ -196,7 +196,7 @@
c.setGroups(entry.getGroups());
c.setName(entry.getName());
return c;
- }
+ }
/**
* Listener for the roster events. It will call the remote listeners registered.
@@ -235,7 +235,8 @@
*/
@Override
public void entriesAdded(Collection<String> addresses) {
- // Log.i(TAG, "Ajout de l'entry " + addresses.size() + " " + addresses.toArray()[0]);
+ // Log.i(TAG, "Ajout de l'entry " + addresses.size() + " " +
+ // addresses.toArray()[0]);
final int n = mRemoteRosListeners.beginBroadcast();
List<String> tab = new ArrayList<String>();
@@ -277,7 +278,8 @@
*/
@Override
public void entriesUpdated(Collection<String> addresses) {
- // Log.i(TAG, "Update de l'entry " + addresses.size() + " " + addresses.toArray()[0]);
+ // Log.i(TAG, "Update de l'entry " + addresses.size() + " " +
+ // addresses.toArray()[0]);
final int n = mRemoteRosListeners.beginBroadcast();
List<String> tab = new ArrayList<String>();
@@ -314,5 +316,5 @@
}
mRemoteRosListeners.finishBroadcast();
}
- }
+ }
}
--- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java Thu Oct 08 15:26:22 2009 +0200
@@ -41,17 +41,18 @@
*/
private static final String TAG = "XMPPConnectionAdapter";
- private XMPPConnection mAdaptee;
+ private static final int PRESENCE_PRIORITY = 128;
+
+ private final XMPPConnection mAdaptee;
private IChatManager mChatManager;
- private String mLogin;
- private String mPassword;
+ private final String mLogin;
+ private final String mPassword;
private RosterAdapter mRoster;
private PrivacyListManagerAdapter mPrivacyList;
- private BeemService mService;
- private RemoteCallbackList<IBeemConnectionListener> mRemoteConnListeners =
- new RemoteCallbackList<IBeemConnectionListener>();
+ private final BeemService mService;
+ private final RemoteCallbackList<IBeemConnectionListener> mRemoteConnListeners = new RemoteCallbackList<IBeemConnectionListener>();
- private ConnexionListenerAdapter mConListener = new ConnexionListenerAdapter();
+ private final ConnexionListenerAdapter mConListener = new ConnexionListenerAdapter();
/**
* Constructor.
@@ -134,13 +135,14 @@
mChatManager = new BeemChatManager(mAdaptee.getChatManager(), mService);
mPrivacyList = new PrivacyListManagerAdapter(mAdaptee);
- this.initFeatures(); // pour declarer les features xmpp qu'on supporte
+ this.initFeatures(); // pour declarer les features xmpp qu'on
+ // supporte
ChatStateManager.getInstance(mAdaptee);
triggerAsynchronousConnectEvent();
- //Priority between -128 and 128
- Presence p = new Presence(Presence.Type.available, "Beem : http://www.beem-project.com",
- 128, Presence.Mode.available);
+ // Priority between -128 and 128
+ Presence p = new Presence(Presence.Type.available, "Beem : http://www.beem-project.com", PRESENCE_PRIORITY,
+ Presence.Mode.available);
mAdaptee.sendPacket(p);
return true;
} catch (XMPPException e) {
@@ -338,14 +340,14 @@
@Override
public void processPacket(Packet packet) {
String from = packet.getFrom();
- Notification notif = new Notification(com.beem.project.beem.R.drawable.signal,
- mService.getString(R.string.AcceptContactRequest), System.currentTimeMillis());
+ Notification notif = new Notification(com.beem.project.beem.R.drawable.signal, mService
+ .getString(R.string.AcceptContactRequest), System.currentTimeMillis());
notif.defaults = Notification.DEFAULT_ALL;
notif.flags = Notification.FLAG_AUTO_CANCEL;
Intent intent = new Intent(mService, Subscription.class);
intent.putExtra("from", from);
- notif.setLatestEventInfo(mService, from, mService.getString(R.string.AcceptContactRequestFrom) + from,
- PendingIntent.getActivity(mService, 0, intent, PendingIntent.FLAG_ONE_SHOT));
+ notif.setLatestEventInfo(mService, from, mService.getString(R.string.AcceptContactRequestFrom)
+ + from, PendingIntent.getActivity(mService, 0, intent, PendingIntent.FLAG_ONE_SHOT));
int id = packet.hashCode();
mService.sendNotification(id, notif);
}
@@ -438,21 +440,19 @@
@Override
public void processPacket(Packet packet) {
String from = packet.getFrom();
- Notification notif = new Notification(com.beem.project.beem.R.drawable.signal,
- mService.getString(R.string.AcceptContactRequest), System.currentTimeMillis());
+ Notification notif = new Notification(com.beem.project.beem.R.drawable.signal, mService
+ .getString(R.string.AcceptContactRequest), System.currentTimeMillis());
notif.defaults = Notification.DEFAULT_ALL;
notif.flags = Notification.FLAG_AUTO_CANCEL;
Intent intent = new Intent(mService, Subscription.class);
intent.putExtra("from", from);
- notif.setLatestEventInfo(mService, from,
- mService.getString(R.string.AcceptContactRequestFrom) + from,
- PendingIntent.getActivity(mService, 0, intent, PendingIntent.FLAG_ONE_SHOT));
+ notif.setLatestEventInfo(mService, from, mService.getString(R.string.AcceptContactRequestFrom)
+ + from, PendingIntent.getActivity(mService, 0, intent, PendingIntent.FLAG_ONE_SHOT));
int id = packet.hashCode();
mService.sendNotification(id, notif);
}
}, filter);
-
final int n = mRemoteConnListeners.beginBroadcast();
for (int i = 0; i < n; i++) {
--- a/src/com/beem/project/beem/service/XmppFacade.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/service/XmppFacade.java Thu Oct 08 15:26:22 2009 +0200
@@ -25,9 +25,9 @@
*/
public class XmppFacade extends IXmppFacade.Stub {
- private XmppConnectionAdapter mConnexion;
- private BeemService mBeemService;
- private JingleService mJingle;
+ private XmppConnectionAdapter mConnexion;
+ private BeemService mBeemService;
+ private JingleService mJingle;
/**
* Constructor for XMPPFacade.
@@ -138,7 +138,7 @@
VCard vcard = new VCard();
try {
- vcard.load(mConnexion.getAdaptee(),jid);
+ vcard.load(mConnexion.getAdaptee(), jid);
return vcard.getAvatar();
} catch (XMPPException e) {
e.printStackTrace();
--- a/src/com/beem/project/beem/service/package-info.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/service/package-info.java Thu Oct 08 15:26:22 2009 +0200
@@ -1,5 +1,5 @@
/**
- * This package contains the class used by the Beem service
- * process.
+ * This package contains the class used by the Beem service process.
*/
package com.beem.project.beem.service;
+
--- a/src/com/beem/project/beem/ui/AddContact.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/AddContact.java Thu Oct 08 15:26:22 2009 +0200
@@ -115,7 +115,6 @@
private final OnClickListener mOkListener = new OnClickListener() {
- @Override
public void onClick(View v) {
String login;
login = getWidgetText(R.id.addc_login);
--- a/src/com/beem/project/beem/ui/ContactDialog.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactDialog.java Thu Oct 08 15:26:22 2009 +0200
@@ -74,7 +74,8 @@
@Override
public void onClick(View v) {
try {
- //TODO permettre a l'user de choisir a quel ressource il veut faire le call.
+ // TODO permettre a l'user de choisir a quel ressource il veut
+ // faire le call.
mXmppFacade.call(mContact.getJID() + "/BEEM");
} catch (RemoteException e) {
e.printStackTrace();
--- a/src/com/beem/project/beem/ui/ContactList.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactList.java Thu Oct 08 15:26:22 2009 +0200
@@ -58,8 +58,8 @@
private BeemBanner mAdapterBanner;
private IRoster mRoster;
private List<Contact> mListContact = new ArrayList<Contact>();
- private List<String> mListGroup = new ArrayList<String>();
- private Map<String, List<Contact>> mContactOnGroup = new HashMap<String, List<Contact>>();
+ private final List<String> mListGroup = new ArrayList<String>();
+ private final Map<String, List<Contact>> mContactOnGroup = new HashMap<String, List<Contact>>();
private String mCurGroup;
private Handler mHandler;
private IXmppFacade mXmppFacade;
@@ -144,7 +144,7 @@
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_CODE) {
- if (resultCode == 69) {
+ if (resultCode == RESULT_OK) {
stopService(SERVICE_INTENT);
finish();
startActivity(new Intent(this, Login.class));
@@ -444,11 +444,11 @@
}
curContact.setStatus(mRoster.getPresence(StringUtils.parseBareAddress(presence.getFrom())));
int status = presence.getStatus();
- if (!resfound
- && (status != Status.CONTACT_STATUS_DISCONNECT && status != Status.CONTACT_STATUS_UNAVAILABLE))
+ if (!resfound && status != Status.CONTACT_STATUS_DISCONNECT
+ && status != Status.CONTACT_STATUS_UNAVAILABLE)
curContact.addRes(pres);
- else if (resfound
- && (status == Status.CONTACT_STATUS_DISCONNECT && status == Status.CONTACT_STATUS_UNAVAILABLE))
+ else if (resfound && status == Status.CONTACT_STATUS_DISCONNECT
+ && status == Status.CONTACT_STATUS_UNAVAILABLE)
curContact.delRes(pres);
mHandler.post(new RunnableChange());
return;
@@ -461,7 +461,7 @@
* Adapter contact list.
*/
private class BeemContactList extends BaseAdapter {
- private LayoutInflater mInflater;
+ private final LayoutInflater mInflater;
/**
* Constructor.
@@ -595,7 +595,7 @@
* Adapter banner list.
*/
public class BeemBanner extends BaseAdapter {
- private Context mContext;
+ private final Context mContext;
/**
* Constructor.
@@ -645,7 +645,7 @@
* The service connection used to connect to the Beem service.
*/
private class BeemServiceConnection implements ServiceConnection {
- private BeemRosterListener mBeemRosterListener = new BeemRosterListener();
+ private final BeemRosterListener mBeemRosterListener = new BeemRosterListener();
/**
* Constructor.
--- a/src/com/beem/project/beem/ui/CreateAccount.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/CreateAccount.java Thu Oct 08 15:26:22 2009 +0200
@@ -32,6 +32,7 @@
private static final boolean DEFAULT_BOOLEAN_VALUE = false;
private static final String DEFAULT_STRING_VALUE = "";
private static final int DEFAULT_INT_VALUE = 0;
+ private static final int DEFAULT_XMPP_PORT = 5222;
private static final int NOTIFICATION_DURATION = Toast.LENGTH_SHORT;
@@ -41,7 +42,8 @@
/**
* Constructor.
*/
- public CreateAccount() { }
+ public CreateAccount() {
+ }
/**
* {@inheritDoc}
@@ -65,9 +67,10 @@
ConnectionConfiguration connectionConfiguration = null;
if (getRegisteredProxy() != null) {
- connectionConfiguration = new ConnectionConfiguration(getXMPPServer(), 5222, getRegisteredProxy());
+ connectionConfiguration = new ConnectionConfiguration(getXMPPServer(), DEFAULT_XMPP_PORT,
+ getRegisteredProxy());
} else {
- connectionConfiguration = new ConnectionConfiguration(getXMPPServer(), 5222);
+ connectionConfiguration = new ConnectionConfiguration(getXMPPServer(), DEFAULT_XMPP_PORT);
}
if (getRegisteredXMPPTLSUse())
connectionConfiguration.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
--- a/src/com/beem/project/beem/ui/GroupList.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/GroupList.java Thu Oct 08 15:26:22 2009 +0200
@@ -10,7 +10,6 @@
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
-import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnKeyListener;
@@ -44,7 +43,7 @@
private ArrayAdapter<String> mGroups;
private Contact mContact;
private TextView mText;
- private ArrayList<String> mStrings = new ArrayList<String>();
+ private final ArrayList<String> mStrings = new ArrayList<String>();
static {
SERVICE_INTENT.setComponent(new ComponentName("com.beem.project.beem", "com.beem.project.beem.BeemService"));
@@ -96,18 +95,7 @@
}
/**
- * On group click listener.
- * @param l The ListView where the click happened
- * @param v The view that was clicked within the ListView
- * @param position The position of the view in the list
- * @param id The row id of the item that was clicked
- */
- protected void onListItemClick(ListView l, View v, int position, long id) {
-
- }
-
- /**
- * init activity lsit adapter.
+ * init activity list adapter.
*/
private void setAdapter() {
try {
--- a/src/com/beem/project/beem/ui/Login.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/Login.java Thu Oct 08 15:26:22 2009 +0200
@@ -111,7 +111,7 @@
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_CODE) {
- if (resultCode == 69) {
+ if (resultCode == RESULT_OK) {
stopService(SERVICE_INTENT);
}
}
--- a/src/com/beem/project/beem/ui/SendIM.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/SendIM.java Thu Oct 08 15:26:22 2009 +0200
@@ -50,6 +50,7 @@
public class SendIM extends Activity implements OnClickListener, OnKeyListener {
+ private static final int STATUS_TXT_SIZE = 12;
private static final String TAG = "SEND_IM";
private static final Intent SERVICE_INTENT = new Intent();
static {
@@ -78,7 +79,6 @@
private TextView mStatusText;
private BeemBroadcastReceiver mReceiver;
-
/**
* Constructor.
*/
@@ -100,7 +100,7 @@
@Override
protected void onCreate(Bundle saveBundle) {
super.onCreate(saveBundle);
- //setTheme(R.style.OldTheme);
+ // setTheme(R.style.OldTheme);
setContentView(R.layout.sendim);
mHandler = new Handler();
mChatManagerListener = new OnChatListener();
@@ -134,7 +134,7 @@
Drawable avatar = getResources().getDrawable(R.drawable.avatar);
ImageView imgV = (ImageView) findViewById(R.id.sendimavatar);
imgV.setImageDrawable(avatar);
- mStatusText.setTextSize(12);
+ mStatusText.setTextSize(STATUS_TXT_SIZE);
mContactName = mContact.getName();
if (mContactName == null || "".equals(mContactName)) {
mContactName = mContact.getJID();
@@ -282,12 +282,13 @@
* The service connection used to connect with the BeemService.
*/
private final class BeemServiceConnection implements ServiceConnection {
- private BeemRosterListener mBeemRosterListener = new BeemRosterListener();
+ private final BeemRosterListener mBeemRosterListener = new BeemRosterListener();
/**
* Constructor.
*/
- public BeemServiceConnection() { }
+ public BeemServiceConnection() {
+ }
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
@@ -399,7 +400,8 @@
/**
* Constructor.
*/
- public OnChatListener() { }
+ public OnChatListener() {
+ }
/**
* {@inheritDoc}
@@ -419,7 +421,8 @@
/**
* Constructor.
*/
- public BeemRosterListener() { }
+ public BeemRosterListener() {
+ }
@Override
public void onEntriesAdded(List<String> addresses) throws RemoteException {
@@ -461,7 +464,8 @@
/**
* Constructor.
*/
- public RunnableChange() { }
+ public RunnableChange() {
+ }
@Override
public void run() {
@@ -470,8 +474,6 @@
}
}
-
-
}
/**
@@ -483,7 +485,8 @@
/**
* Constructor.
*/
- public OnMessageListener() { }
+ public OnMessageListener() {
+ }
/**
* {@inheritDoc}
--- a/src/com/beem/project/beem/ui/SendIMDialogSmiley.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/SendIMDialogSmiley.java Thu Oct 08 15:26:22 2009 +0200
@@ -11,7 +11,7 @@
public class SendIMDialogSmiley extends Dialog {
@SuppressWarnings("unused")
- private SendIM mSendIM;
+ private SendIM mSendIM;
@SuppressWarnings("unused")
private SharedPreferences mSet;
--- a/src/com/beem/project/beem/ui/Settings.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/Settings.java Thu Oct 08 15:26:22 2009 +0200
@@ -66,9 +66,10 @@
public void onStop() {
super.onStop();
SharedPreferences settings = getPreferenceManager().getSharedPreferences();
- settings.edit().putBoolean("PreferenceIsConfigured",
+ settings.edit().putBoolean(
+ "PreferenceIsConfigured",
!"".equals(settings.getString("settings_key_account_username", ""))
- || !"".equals(settings.getString("settings_key_account_password", ""))).commit();
+ || !"".equals(settings.getString("settings_key_account_password", ""))).commit();
}
/**
@@ -81,8 +82,6 @@
return true;
}
-
-
/**
* {@inheritDoc}
*/
@@ -95,11 +94,12 @@
startActivity(i);
return true;
case R.id.settings_menu_login:
- setResult(69);
+ setResult(RESULT_OK);
SharedPreferences settings = getPreferenceManager().getSharedPreferences();
- settings.edit().putBoolean("PreferenceIsConfigured",
+ settings.edit().putBoolean(
+ "PreferenceIsConfigured",
!"".equals(settings.getString("settings_key_account_username", ""))
- || !"".equals(settings.getString("settings_key_account_password", ""))).commit();
+ || !"".equals(settings.getString("settings_key_account_password", ""))).commit();
this.stopService(SERVICE_INTENT);
finish();
return true;
@@ -120,7 +120,7 @@
@Override
public void onReceive(Context context, Intent intent) {
- Settings.this.setResult(69);
+ Settings.this.setResult(RESULT_CANCELED);
}
}
}
--- a/src/com/beem/project/beem/ui/Subscription.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/Subscription.java Thu Oct 08 15:26:22 2009 +0200
@@ -94,23 +94,21 @@
PresenceAdapter preAdapt = new PresenceAdapter(presence);
try {
mService.sendPresencePacket(preAdapt);
- Toast.makeText(Subscription.this, getString(R.string.SubscriptAccept),
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(Subscription.this, getString(R.string.SubscriptAccept), Toast.LENGTH_SHORT)
+ .show();
finish();
} catch (RemoteException e) {
- Toast.makeText(Subscription.this, getString(R.string.SubscriptError),
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(Subscription.this, getString(R.string.SubscriptError), Toast.LENGTH_SHORT)
+ .show();
e.printStackTrace();
}
break;
case R.id.SubscriptionRefuse:
- Toast.makeText(Subscription.this, getString(R.string.SubscriptRefused),
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(Subscription.this, getString(R.string.SubscriptRefused), Toast.LENGTH_SHORT).show();
break;
default:
- Toast.makeText(Subscription.this, getString(R.string.SubscriptError),
- Toast.LENGTH_SHORT).show();
+ Toast.makeText(Subscription.this, getString(R.string.SubscriptError), Toast.LENGTH_SHORT).show();
}
}
};
--- a/src/com/beem/project/beem/ui/package-info.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/ui/package-info.java Thu Oct 08 15:26:22 2009 +0200
@@ -1,5 +1,5 @@
/**
- * This package contains the class concerning the user interface
- * (activities) of Beem.
+ * This package contains the class concerning the user interface (activities) of Beem.
*/
package com.beem.project.beem.ui;
+
--- a/src/com/beem/project/beem/utils/FreePort.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/utils/FreePort.java Thu Oct 08 15:26:22 2009 +0200
@@ -9,6 +9,9 @@
*/
public final class FreePort {
+ private static final int MAGIC_10 = 10;
+ private static final int MAGIC_10000 = 10000;
+
/**
* Private default constructor.
*/
@@ -23,8 +26,8 @@
ServerSocket ss;
int freePort = 0;
- for (int i = 0; i < 10; i++) {
- freePort = (int) (10000 + Math.round(Math.random() * 10000));
+ for (int i = 0; i < MAGIC_10; i++) {
+ freePort = (int) (MAGIC_10000 + Math.round(Math.random() * MAGIC_10000));
try {
ss = new ServerSocket(freePort);
freePort = ss.getLocalPort();
--- a/src/com/beem/project/beem/utils/package-info.java Thu Oct 08 15:00:12 2009 +0200
+++ b/src/com/beem/project/beem/utils/package-info.java Thu Oct 08 15:26:22 2009 +0200
@@ -2,3 +2,4 @@
* This package contains utility class used by the Beem project.
*/
package com.beem.project.beem.utils;
+