1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 10:19:33 +02:00

code cleanup

This commit is contained in:
Nikolay Pultsin 2011-12-18 15:05:37 +00:00
parent d05318fc59
commit 592a37db4f
2 changed files with 9 additions and 11 deletions

View file

@ -74,7 +74,7 @@ public class AuthenticationActivity extends Activity {
}
}
static class CredentialsCreator extends ZLNetworkManager.BasicCredentialsCreator {
static class CredentialsCreator extends ZLNetworkManager.CredentialsCreator {
private final Context myContext;
CredentialsCreator(Context context) {
@ -210,8 +210,8 @@ public class AuthenticationActivity extends Activity {
private void finishOk(String username, String password) {
final ZLNetworkManager.CredentialsCreator creator =
ZLNetworkManager.Instance().getCredentialsCreator();
if (creator instanceof CredentialsCreator) {
((CredentialsCreator)creator).setCredentials(username, password);
if (creator != null) {
creator.setCredentials(username, password);
}
finish();
}
@ -280,8 +280,8 @@ public class AuthenticationActivity extends Activity {
protected void onStop() {
final ZLNetworkManager.CredentialsCreator creator =
ZLNetworkManager.Instance().getCredentialsCreator();
if (creator instanceof CredentialsCreator) {
((CredentialsCreator)creator).release();
if (creator != null) {
creator.release();
}
super.onStop();
}