1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-23 09:52:16 -05:00

Minimize scope of local variables

This commit is contained in:
cketti 2015-03-06 23:08:34 +01:00
parent c4e202ecd9
commit abd2b20850
2 changed files with 4 additions and 7 deletions

View File

@ -277,8 +277,6 @@ public class AccountSetupBasics extends K9Activity
String[] emailParts = splitEmail(email);
String user = emailParts[0];
String domain = emailParts[1];
URI incomingUri;
URI outgoingUri;
try {
String userEnc = UrlEncodingHelper.encodeUtf8(user);
String passwordEnc = UrlEncodingHelper.encodeUtf8(password);
@ -289,15 +287,15 @@ public class AccountSetupBasics extends K9Activity
incomingUsername = incomingUsername.replaceAll("\\$domain", domain);
URI incomingUriTemplate = mProvider.incomingUriTemplate;
incomingUri = new URI(incomingUriTemplate.getScheme(), incomingUsername + ":"
+ passwordEnc, incomingUriTemplate.getHost(), incomingUriTemplate.getPort(), null,
null, null);
URI incomingUri = new URI(incomingUriTemplate.getScheme(), incomingUsername + ":" + passwordEnc,
incomingUriTemplate.getHost(), incomingUriTemplate.getPort(), null, null, null);
String outgoingUsername = mProvider.outgoingUsernameTemplate;
URI outgoingUriTemplate = mProvider.outgoingUriTemplate;
URI outgoingUri;
if (outgoingUsername != null) {
outgoingUsername = outgoingUsername.replaceAll("\\$email", email);
outgoingUsername = outgoingUsername.replaceAll("\\$user", userEnc);

View File

@ -67,9 +67,8 @@ public class FolderSettings extends K9PreferenceActivity {
}
boolean isPushCapable = false;
Store store;
try {
store = mAccount.getRemoteStore();
Store store = mAccount.getRemoteStore();
isPushCapable = store.isPushCapable();
} catch (Exception e) {
Log.e(K9.LOG_TAG, "Could not get remote store", e);