mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 09:08:49 -05:00
Merge pull request #454 from mallamanis/master
Renaming variables for codebase consistency
This commit is contained in:
commit
bf9264dbb0
@ -1737,28 +1737,28 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
||||
|
||||
if (K9.DEBUG)
|
||||
Log.d(K9.LOG_TAG, "Got a saved legacy identity: " + identityString);
|
||||
StringTokenizer tokens = new StringTokenizer(identityString, ":", false);
|
||||
StringTokenizer tokenizer = new StringTokenizer(identityString, ":", false);
|
||||
|
||||
// First item is the body length. We use this to separate the composed reply from the quoted text.
|
||||
if (tokens.hasMoreTokens()) {
|
||||
String bodyLengthS = Utility.base64Decode(tokens.nextToken());
|
||||
if (tokenizer.hasMoreTokens()) {
|
||||
String bodyLengthS = Utility.base64Decode(tokenizer.nextToken());
|
||||
try {
|
||||
identity.put(IdentityField.LENGTH, Integer.valueOf(bodyLengthS).toString());
|
||||
} catch (Exception e) {
|
||||
Log.e(K9.LOG_TAG, "Unable to parse bodyLength '" + bodyLengthS + "'");
|
||||
}
|
||||
}
|
||||
if (tokens.hasMoreTokens()) {
|
||||
identity.put(IdentityField.SIGNATURE, Utility.base64Decode(tokens.nextToken()));
|
||||
if (tokenizer.hasMoreTokens()) {
|
||||
identity.put(IdentityField.SIGNATURE, Utility.base64Decode(tokenizer.nextToken()));
|
||||
}
|
||||
if (tokens.hasMoreTokens()) {
|
||||
identity.put(IdentityField.NAME, Utility.base64Decode(tokens.nextToken()));
|
||||
if (tokenizer.hasMoreTokens()) {
|
||||
identity.put(IdentityField.NAME, Utility.base64Decode(tokenizer.nextToken()));
|
||||
}
|
||||
if (tokens.hasMoreTokens()) {
|
||||
identity.put(IdentityField.EMAIL, Utility.base64Decode(tokens.nextToken()));
|
||||
if (tokenizer.hasMoreTokens()) {
|
||||
identity.put(IdentityField.EMAIL, Utility.base64Decode(tokenizer.nextToken()));
|
||||
}
|
||||
if (tokens.hasMoreTokens()) {
|
||||
identity.put(IdentityField.QUOTED_TEXT_MODE, Utility.base64Decode(tokens.nextToken()));
|
||||
if (tokenizer.hasMoreTokens()) {
|
||||
identity.put(IdentityField.QUOTED_TEXT_MODE, Utility.base64Decode(tokenizer.nextToken()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1008,17 +1008,17 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
||||
}
|
||||
|
||||
private FolderInfoHolder getFolder(String folder, Account account) {
|
||||
LocalFolder local_folder = null;
|
||||
LocalFolder localFolder = null;
|
||||
try {
|
||||
LocalStore localStore = account.getLocalStore();
|
||||
local_folder = localStore.getFolder(folder);
|
||||
return new FolderInfoHolder(mContext, local_folder, account);
|
||||
localFolder = localStore.getFolder(folder);
|
||||
return new FolderInfoHolder(mContext, localFolder, account);
|
||||
} catch (Exception e) {
|
||||
Log.e(K9.LOG_TAG, "getFolder(" + folder + ") goes boom: ", e);
|
||||
return null;
|
||||
} finally {
|
||||
if (local_folder != null) {
|
||||
local_folder.close();
|
||||
if (localFolder != null) {
|
||||
localFolder.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class TextBody implements Body {
|
||||
b = EMPTY_BYTE_ARRAY;
|
||||
}
|
||||
return new ByteArrayInputStream(b);
|
||||
} catch (UnsupportedEncodingException usee) {
|
||||
} catch (UnsupportedEncodingException uee) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -1068,7 +1068,7 @@ public class LocalStore extends Store implements Serializable {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
} catch (UnsupportedEncodingException usee) {
|
||||
} catch (UnsupportedEncodingException uee) {
|
||||
throw new Error("Aparently UTF-8 has been lost to the annals of history.");
|
||||
}
|
||||
}
|
||||
@ -2807,10 +2807,10 @@ public class LocalStore extends Store implements Serializable {
|
||||
*/
|
||||
String disposition = attachment.getDisposition();
|
||||
if (disposition != null) {
|
||||
String s = MimeUtility.getHeaderParameter(disposition, "size");
|
||||
if (s != null) {
|
||||
String sizeParam = MimeUtility.getHeaderParameter(disposition, "size");
|
||||
if (sizeParam != null) {
|
||||
try {
|
||||
size = Integer.parseInt(s);
|
||||
size = Integer.parseInt(sizeParam);
|
||||
} catch (NumberFormatException e) { /* Ignore */ }
|
||||
}
|
||||
}
|
||||
|
@ -608,8 +608,8 @@ public class SettingsImporter {
|
||||
}
|
||||
|
||||
private static boolean isIdentityDescriptionUsed(String description, List<Identity> identities) {
|
||||
for (Identity identitiy : identities) {
|
||||
if (identitiy.getDescription().equals(description)) {
|
||||
for (Identity identity : identities) {
|
||||
if (identity.getDescription().equals(description)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user