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