Added toast message
git-svn-id: https://forja.rediris.es/svn/cusl6-swadroid/trunk@105 5bc14d19-1e4b-4ba2-aa50-860af135f48c
This commit is contained in:
parent
784046b298
commit
612a69ddf9
|
@ -57,12 +57,6 @@ public class Login extends Module {
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setMETHOD_NAME("loginByUserPasswordKey");
|
setMETHOD_NAME("loginByUserPasswordKey");
|
||||||
isConnected = connectionAvailable(this);
|
|
||||||
|
|
||||||
if (!isConnected) {
|
|
||||||
Toast.makeText(this, R.string.errorMsgNoConnection, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
|
|
||||||
connect();
|
connect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +67,7 @@ public class Login extends Module {
|
||||||
protected void connect() {
|
protected void connect() {
|
||||||
String progressDescription = getString(R.string.loginProgressDescription);
|
String progressDescription = getString(R.string.loginProgressDescription);
|
||||||
int progressTitle = R.string.loginProgressTitle;
|
int progressTitle = R.string.loginProgressTitle;
|
||||||
|
Toast.makeText(this, progressDescription, Toast.LENGTH_LONG).show();
|
||||||
|
|
||||||
new Connect(false, progressDescription, progressTitle).execute();
|
new Connect(false, progressDescription, progressTitle).execute();
|
||||||
}
|
}
|
||||||
|
@ -89,7 +84,6 @@ public class Login extends Module {
|
||||||
protected void requestService()
|
protected void requestService()
|
||||||
throws NoSuchAlgorithmException, IOException, XmlPullParserException, SoapFault, IllegalAccessException, InstantiationException {
|
throws NoSuchAlgorithmException, IOException, XmlPullParserException, SoapFault, IllegalAccessException, InstantiationException {
|
||||||
|
|
||||||
if (isConnected) {
|
|
||||||
//Encrypts user password with SHA-512 and encodes it to Base64UrlSafe
|
//Encrypts user password with SHA-512 and encodes it to Base64UrlSafe
|
||||||
md = MessageDigest.getInstance("SHA-512");
|
md = MessageDigest.getInstance("SHA-512");
|
||||||
md.update(prefs.getUserPassword().getBytes());
|
md.update(prefs.getUserPassword().getBytes());
|
||||||
|
@ -120,7 +114,6 @@ public class Login extends Module {
|
||||||
//Request finalized without errors
|
//Request finalized without errors
|
||||||
setResult(RESULT_OK);
|
setResult(RESULT_OK);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user