merge
authorDa Risk <darisk972@gmail.com>
Sat, 13 Feb 2010 21:16:50 +0100
changeset 662 f4349711b6c8
parent 661 c6f9f2fcaf06 (current diff)
parent 658 baaee1877b2b (diff)
child 663 f4bf7d926d08
merge
res/values-fr/strings.xml
res/values/strings.xml
--- a/.classpath	Sat Feb 13 21:11:50 2010 +0100
+++ b/.classpath	Sat Feb 13 21:16:50 2010 +0100
@@ -1,10 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
-	<classpathentry exported="true" kind="lib" path="libs/security.jar"/>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="gen"/>
-	<classpathentry kind="lib" path="libs/jlibrtp.jar"/>
-	<classpathentry kind="lib" path="libs/asmack-jse.jar"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+	<classpathentry kind="lib" path="libs/asmack-jse.jar" sourcepath="/home/nikita/devel/smack/source"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="gen"/>
+	<classpathentry kind="lib" path="libs/jlibrtp.jar"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
--- a/AndroidManifest.xml	Sat Feb 13 21:11:50 2010 +0100
+++ b/AndroidManifest.xml	Sat Feb 13 21:16:50 2010 +0100
@@ -65,12 +65,13 @@
 					android:name="com.beem.project.beem.service.XmppConnectionAdapter.CONNECTION_CLOSED" />
 			</intent-filter>
 		</activity>
-		<!-- Could be interesting if we would launch beem at startup
-		<receiver android:name=".tool.BeemBroadcastReceiver" android:enabled="true">
-			<intent-filter>
-				<action android:name="android.intent.action.BOOT_COMPLETED" />
-			</intent-filter>
-		</receiver>  -->
+		<!--
+			Could be interesting if we would launch beem at startup <receiver
+			android:name=".tool.BeemBroadcastReceiver" android:enabled="true">
+			<intent-filter> <action
+			android:name="android.intent.action.BOOT_COMPLETED" />
+			</intent-filter> </receiver>
+		-->
 		<service android:name="BeemService" android:enabled="true"
 			android:label="Beem Service" android:permission="com.beem.project.beem.BEEM_SERVICE">
 			<intent-filter>
@@ -85,6 +86,7 @@
 	<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.ACCESS_NETWORK_STATE"></uses-permission>
-	<uses-sdk android:minSdkVersion="3"/>
-
+	<uses-sdk android:minSdkVersion="3" />
+	<supports-screens android:largeScreens="true"
+		android:normalScreens="true" android:smallScreens="true" android:anyDensity="true" />
 </manifest> 
--- a/default.properties	Sat Feb 13 21:11:50 2010 +0100
+++ b/default.properties	Sat Feb 13 21:16:50 2010 +0100
@@ -10,5 +10,5 @@
 # Indicates whether an apk should be generated for each density.
 split.density=false
 # Project target.
-target=android-4
+target=android-7
 apk-configurations=
--- a/res/values-fr/strings.xml	Sat Feb 13 21:11:50 2010 +0100
+++ b/res/values-fr/strings.xml	Sat Feb 13 21:16:50 2010 +0100
@@ -303,4 +303,33 @@
 	<string name="privacy_list_delete_dialog_no">Non</string>
 
 	<string name="UpdateButton">Mettre à jour</string>
+	
+	<!-- Error messages -->
+	
+	<string name="error_login_authentication">Erreur lors de l\'authenfitication, mauvais login ou password</string>
+	
+	<string name="interna_server_error">Erreur survenu sur le serveur</string>
+	<string name="bad_request">bad-request</string>
+	<string name="forbidden">forbidden</string>
+	<string name="item_not_found">item-not-found</string>
+	<string name="conflict">conflict</string>
+	<string name="feature_not_implemented">feature-not-implemented</string>
+	<string name="gone">gone</string>
+	<string name="jid_malformed">jid-malformed</string>
+	<string name="no_acceptable">no-acceptable</string>
+	<string name="not_allowed">not-allowed</string>
+	<string name="not_authorized">not-authorized</string>
+	<string name="payment_required">payment-required</string>
+	<string name="recipient_unavailable">recipient-unavailable</string>
+	<string name="redirect">redirect</string>
+	<string name="registration_required">registration-required</string>
+	<string name="remote_server_not_found">Serveur non trouvé</string>
+	<string name="remote_server_timeout">Pas de réponse du serveur</string>
+	<string name="remote_server_error">Erreur survenu sur le serveur</string>
+	<string name="resource_constraint">resource-constraint</string>
+	<string name="service_unavailable">service-unavailable</string>
+	<string name="subscription_required">subscription-required</string>
+	<string name="undefined_condition">undefined-condition</string>
+	<string name="unexpected_condition">unexpected-condition</string>
+	<string name="request_timeout">request-timeout</string>
 </resources>
--- a/res/values/strings.xml	Sat Feb 13 21:11:50 2010 +0100
+++ b/res/values/strings.xml	Sat Feb 13 21:16:50 2010 +0100
@@ -287,4 +287,33 @@
 	<string name="privacy_list_delete_dialog_no">No</string>
 
 	<string name="UpdateButton">Update</string>
+	
+	<!-- Error messages -->
+	
+	<string name="error_login_authentication">Error during authentication, bad login or password.</string>
+	
+	<string name="interna_server_error">Remote server error</string>
+	<string name="bad_request">bad-request</string>
+	<string name="forbidden">forbidden</string>
+	<string name="item_not_found">item-not-found</string>
+	<string name="conflict">conflict</string>
+	<string name="feature_not_implemented">feature-not-implemented</string>
+	<string name="gone">gone</string>
+	<string name="jid_malformed">jid-malformed</string>
+	<string name="no_acceptable">no-acceptable</string>
+	<string name="not_allowed">not-allowed</string>
+	<string name="not_authorized">not-authorized</string>
+	<string name="payment_required">payment-required</string>
+	<string name="recipient_unavailable">recipient-unavailable</string>
+	<string name="redirect">redirect</string>
+	<string name="registration_required">registration-required</string>
+	<string name="remote_server_not_found">Remote server not found</string>
+	<string name="remote_server_timeout">No server response</string>
+	<string name="remote_server_error">Remote server error</string>
+	<string name="resource_constraint">resource-constraint</string>
+	<string name="service_unavailable">service-unavailable</string>
+	<string name="subscription_required">subscription-required</string>
+	<string name="undefined_condition">undefined-condition</string>
+	<string name="unexpected_condition">unexpected-condition</string>
+	<string name="request_timeout">request-timeout</string>
 </resources>
--- a/src/com/beem/project/beem/BeemService.java	Sat Feb 13 21:11:50 2010 +0100
+++ b/src/com/beem/project/beem/BeemService.java	Sat Feb 13 21:16:50 2010 +0100
@@ -40,7 +40,7 @@
     Flavien Astraud, November 26, 2009
     Head of the EIP Laboratory.
 
-*/
+ */
 package com.beem.project.beem;
 
 import org.jivesoftware.smack.ConnectionConfiguration;
@@ -138,7 +138,7 @@
      * Initialise la configuration de la connexion.
      */
     private void initConnectionConfig() {
-	java.security.Security.addProvider(new com.sun.security.sasl.Provider());
+	//java.security.Security.addProvider(new com.sun.security.sasl.Provider());
 	mUseProxy = mSettings.getBoolean("settings_key_proxy_use", false);
 	if (mUseProxy) {
 	    String stype = mSettings.getString("settings_key_proxy_type", "HTTP");
@@ -311,6 +311,10 @@
      * @param pm The ProviderManager.
      */
     private void configure(ProviderManager pm) {
+	// Privacy
+	pm.addIQProvider("query", "jabber:iq:privacy", new PrivacyProvider());
+	
+	/*
 	// Private Data Storage
 	pm.addIQProvider("query", "jabber:iq:private", new PrivateDataManager.PrivateDataIQProvider());
 	// Time
@@ -377,8 +381,7 @@
 	pm.addIQProvider("open", "http://jabber.org/protocol/ibb", new IBBProviders.Open());
 	pm.addIQProvider("close", "http://jabber.org/protocol/ibb", new IBBProviders.Close());
 	pm.addExtensionProvider("data", "http://jabber.org/protocol/ibb", new IBBProviders.Data());
-	// Privacy
-	pm.addIQProvider("query", "jabber:iq:privacy", new PrivacyProvider());
+
 	pm.addIQProvider("command", COMMAND_NAMESPACE, new AdHocCommandDataProvider());
 	pm.addExtensionProvider("malformed-action", COMMAND_NAMESPACE,
 	    new AdHocCommandDataProvider.MalformedActionError());
@@ -390,6 +393,7 @@
 	    new AdHocCommandDataProvider.BadSessionIDError());
 	pm.addExtensionProvider("session-expired", COMMAND_NAMESPACE,
 	    new AdHocCommandDataProvider.SessionExpiredError());
+	    */
     }
 }
 
--- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java	Sat Feb 13 21:11:50 2010 +0100
+++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java	Sat Feb 13 21:16:50 2010 +0100
@@ -40,7 +40,7 @@
     Flavien Astraud, November 26, 2009
     Head of the EIP Laboratory.
 
-*/
+ */
 package com.beem.project.beem.service;
 
 import org.jivesoftware.smack.ConnectionConfiguration;
@@ -171,10 +171,17 @@
 		return true;
 	    } catch (XMPPException e) {
 		Log.e(TAG, "Error while connecting", e);
-		if (!"".equals(e.getMessage()))
-		    mErrorMsg = e.getMessage();
-		else
-		    mErrorMsg = e.toString();
+		try {
+		    String str = mService.getResources().getString(
+			mService.getResources().getIdentifier(
+			    e.getXMPPError().getCondition().replace("-", "_"), "string", "com.beem.project.beem"));
+		    mErrorMsg = str;
+		} catch(NullPointerException e2) {
+		    if (!"".equals(e.getMessage()))
+			mErrorMsg = e.getMessage();
+		    else
+			mErrorMsg = e.toString();
+		}
 	    }
 	    return false;
 	}
@@ -211,15 +218,12 @@
 	    mService.resetStatus();
 	    mService.initJingle(mAdaptee);
 
-	  //  triggerAsynchronousConnectEvent();
+	    //  triggerAsynchronousConnectEvent();
 	    changeStatus(Status.CONTACT_STATUS_AVAILABLE, mService.getServicePreference().getString("status_text", ""));
 	    return true;
 	} catch (XMPPException e) {
 	    Log.e(TAG, "Error while connecting", e);
-	    if (!"".equals(e.getMessage()))
-		mErrorMsg = e.getMessage();
-	    else
-		mErrorMsg = e.toString();
+	    mErrorMsg = mService.getString(R.string.error_login_authentication);
 	    return false;
 	}
     }