Added toast message
This commit is contained in:
parent
7dce99ec38
commit
725cd7ef9a
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user