Merge branch 'hotfix/0.1.1'
This commit is contained in:
commit
5c2c7355a1
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="es.ugr.swad.swadroid"
|
||||
android:versionCode="1" android:versionName="0.1" android:installLocation="auto">
|
||||
android:installLocation="auto" android:versionName="0.1.1" android:versionCode="2">
|
||||
<application>
|
||||
<activity android:name=".SWADMain"
|
||||
android:label="@string/app_name"
|
||||
|
|
|
@ -32,6 +32,7 @@ public final class R {
|
|||
public static final int app_name=0x7f050000;
|
||||
public static final int close_dialog=0x7f050003;
|
||||
public static final int errorMsgLaunchingActivity=0x7f050014;
|
||||
public static final int errorMsgWorkaroundEmulator=0x7f050015;
|
||||
public static final int functionsTitle_menu=0x7f05000f;
|
||||
public static final int loginModuleLabel=0x7f050001;
|
||||
public static final int loginProgressDescription=0x7f050013;
|
||||
|
|
|
@ -20,5 +20,5 @@
|
|||
<string name="loginTitle_menu">Conectar</string>
|
||||
<string name="loginProgressTitle">Identificación</string>
|
||||
<string name="loginProgressDescription">Conectando...</string>
|
||||
<string name="errorMsgLaunchingActivity">Ha ocurrido un error durante la ejecución de la operación</string>
|
||||
<string name="errorMsgLaunchingActivity">Ha ocurrido un error durante la ejecución de la operación</string><string name="errorMsgWorkaroundEmulator">Mierda. Ese bug del emulador de Android ha vuelto a aparecer. Reintentando...</string>
|
||||
</resources>
|
|
@ -21,4 +21,5 @@
|
|||
<string name="loginProgressTitle">Login</string>
|
||||
<string name="loginProgressDescription">Connecting...</string>
|
||||
<string name="errorMsgLaunchingActivity">An error occurred during the execution of the operation</string>
|
||||
<string name="errorMsgWorkaroundEmulator">Damn. That Android emulator bug appeared again. Retrying...</string>
|
||||
</resources>
|
|
@ -28,4 +28,8 @@ public class Global {
|
|||
* Request code for Login module.
|
||||
*/
|
||||
public static final int LOGIN_REQUEST_CODE = 1;
|
||||
/**
|
||||
* Class Module's tag name for Logcat
|
||||
*/
|
||||
public static final String MODULE_TAG = "Module";
|
||||
}
|
||||
|
|
|
@ -40,11 +40,11 @@ public class Login extends Module {
|
|||
/**
|
||||
* Digest for user password.
|
||||
*/
|
||||
MessageDigest md;
|
||||
private MessageDigest md;
|
||||
/**
|
||||
* User password.
|
||||
*/
|
||||
String userPassword;
|
||||
private String userPassword;
|
||||
|
||||
/**
|
||||
* Called when activity is first created.
|
||||
|
|
|
@ -22,6 +22,8 @@ package es.ugr.swad.swadroid.modules;
|
|||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.util.Log;
|
||||
import es.ugr.swad.swadroid.Global;
|
||||
import es.ugr.swad.swadroid.Preferences;
|
||||
import es.ugr.swad.swadroid.R;
|
||||
import java.io.IOException;
|
||||
|
@ -209,7 +211,17 @@ public class Module extends Activity {
|
|||
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
|
||||
envelope.setOutputSoapObject(request);
|
||||
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
|
||||
androidHttpTransport.call(SOAP_ACTION, envelope);
|
||||
|
||||
//If an XmlPullParserException occurs, retry once in order to workaround an Android emulator bug
|
||||
try {
|
||||
androidHttpTransport.call(SOAP_ACTION, envelope);
|
||||
} catch(XmlPullParserException ex) {
|
||||
Log.e(Global.MODULE_TAG, ex.getLocalizedMessage());
|
||||
ex.printStackTrace();
|
||||
Log.e(Global.MODULE_TAG, getString(R.string.errorMsgWorkaroundEmulator));
|
||||
androidHttpTransport.call(SOAP_ACTION, envelope);
|
||||
}
|
||||
|
||||
result = (SoapObject) envelope.getResponse();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user