Added toast message

This commit is contained in:
Juan Miguel Boyero Corral 2011-03-05 20:57:27 +01:00
parent 7dce99ec38
commit 725cd7ef9a

View File

@ -57,12 +57,6 @@ public class Login extends Module {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setMETHOD_NAME("loginByUserPasswordKey");
isConnected = connectionAvailable(this);
if (!isConnected) {
Toast.makeText(this, R.string.errorMsgNoConnection, Toast.LENGTH_LONG).show();
}
connect();
}
@ -73,6 +67,7 @@ public class Login extends Module {
protected void connect() {
String progressDescription = getString(R.string.loginProgressDescription);
int progressTitle = R.string.loginProgressTitle;
Toast.makeText(this, progressDescription, Toast.LENGTH_LONG).show();
new Connect(false, progressDescription, progressTitle).execute();
}
@ -89,7 +84,6 @@ public class Login extends Module {
protected void requestService()
throws NoSuchAlgorithmException, IOException, XmlPullParserException, SoapFault, IllegalAccessException, InstantiationException {
if (isConnected) {
//Encrypts user password with SHA-512 and encodes it to Base64UrlSafe
md = MessageDigest.getInstance("SHA-512");
md.update(prefs.getUserPassword().getBytes());
@ -120,7 +114,6 @@ public class Login extends Module {
//Request finalized without errors
setResult(RESULT_OK);
}
}
finish();
}