1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

Removed unnecessary type casts

This commit is contained in:
cketti 2011-01-19 01:21:27 +00:00
parent 14a20843e3
commit 7119c7165f
7 changed files with 14 additions and 14 deletions

View File

@ -815,7 +815,7 @@ public class FolderList extends K9ListActivity
FolderInfoHolder folder = (FolderInfoHolder) mAdapter.getItem(info.position); FolderInfoHolder folder = (FolderInfoHolder) mAdapter.getItem(info.position);
menu.setHeaderTitle((CharSequence) folder.displayName); menu.setHeaderTitle(folder.displayName);
if (!folder.name.equals(mAccount.getTrashFolderName())) if (!folder.name.equals(mAccount.getTrashFolderName()))
menu.findItem(R.id.empty_trash).setVisible(false); menu.findItem(R.id.empty_trash).setVisible(false);
@ -1285,7 +1285,7 @@ public class FolderList extends K9ListActivity
{ {
FolderInfoHolder searchHolder = new FolderInfoHolder(); FolderInfoHolder searchHolder = new FolderInfoHolder();
searchHolder.name = folder; searchHolder.name = folder;
return mFolders.indexOf((Object) searchHolder); return mFolders.indexOf(searchHolder);
} }
public FolderInfoHolder getFolder(String folder) public FolderInfoHolder getFolder(String folder)

View File

@ -336,7 +336,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
final Intent intent = getIntent(); final Intent intent = getIntent();
mMessageReference = (MessageReference) intent.getSerializableExtra(EXTRA_MESSAGE_REFERENCE); mMessageReference = (MessageReference) intent.getSerializableExtra(EXTRA_MESSAGE_REFERENCE);
mSourceMessageBody = (String) intent.getStringExtra(EXTRA_MESSAGE_BODY); mSourceMessageBody = intent.getStringExtra(EXTRA_MESSAGE_BODY);
if(K9.DEBUG && mSourceMessageBody != null) if(K9.DEBUG && mSourceMessageBody != null)
Log.d(K9.LOG_TAG, "Composing message with explicitly specified message body."); Log.d(K9.LOG_TAG, "Composing message with explicitly specified message body.");
@ -559,7 +559,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
mMessageContentView.requestFocus(); mMessageContentView.requestFocus();
} }
mEncryptLayout = (View)findViewById(R.id.layout_encrypt); mEncryptLayout = findViewById(R.id.layout_encrypt);
mCryptoSignatureCheckbox = (CheckBox)findViewById(R.id.cb_crypto_signature); mCryptoSignatureCheckbox = (CheckBox)findViewById(R.id.cb_crypto_signature);
mCryptoSignatureUserId = (TextView)findViewById(R.id.userId); mCryptoSignatureUserId = (TextView)findViewById(R.id.userId);
mCryptoSignatureUserIdRest = (TextView)findViewById(R.id.userIdRest); mCryptoSignatureUserIdRest = (TextView)findViewById(R.id.userIdRest);
@ -844,7 +844,7 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
protected void onRestoreInstanceState(Bundle savedInstanceState) protected void onRestoreInstanceState(Bundle savedInstanceState)
{ {
super.onRestoreInstanceState(savedInstanceState); super.onRestoreInstanceState(savedInstanceState);
ArrayList<Parcelable> attachments = (ArrayList<Parcelable>) savedInstanceState.getParcelableArrayList(STATE_KEY_ATTACHMENTS); ArrayList<Parcelable> attachments = savedInstanceState.getParcelableArrayList(STATE_KEY_ATTACHMENTS);
mAttachments.removeAllViews(); mAttachments.removeAllViews();
for (Parcelable p : attachments) for (Parcelable p : attachments)
{ {

View File

@ -2030,7 +2030,7 @@ public class MessageList
getMenuInflater().inflate(R.menu.message_list_context, menu); getMenuInflater().inflate(R.menu.message_list_context, menu);
menu.setHeaderTitle((CharSequence) message.message.getSubject()); menu.setHeaderTitle(message.message.getSubject());
if (message.read) if (message.read)
{ {
@ -2518,7 +2518,7 @@ public class MessageList
{ {
LocalStore localStore = account.getLocalStore(); LocalStore localStore = account.getLocalStore();
local_folder = localStore.getFolder(folder); local_folder = localStore.getFolder(folder);
return new FolderInfoHolder(context, (Folder)local_folder, account); return new FolderInfoHolder(context, local_folder, account);
} }
catch (Exception e) catch (Exception e)
{ {
@ -2560,7 +2560,7 @@ public class MessageList
MessageInfoHolder messageHolder =(MessageInfoHolder) getItem(position); MessageInfoHolder messageHolder =(MessageInfoHolder) getItem(position);
if (messageHolder != null) if (messageHolder != null)
{ {
return ((LocalStore.LocalMessage) messageHolder.message).getId(); return messageHolder.message.getId();
} }
} }
catch (Exception e) catch (Exception e)
@ -2748,7 +2748,7 @@ public class MessageList
holder.subject.setTypeface(null, message.read ? Typeface.NORMAL : Typeface.BOLD); holder.subject.setTypeface(null, message.read ? Typeface.NORMAL : Typeface.BOLD);
// XXX TODO there has to be some way to walk our view hierarchy and get this // XXX TODO there has to be some way to walk our view hierarchy and get this
holder.flagged.setTag((Integer)position); holder.flagged.setTag(position);
holder.flagged.setChecked(message.flagged); holder.flagged.setChecked(message.flagged);
// So that the mSelectedCount is only incremented/decremented // So that the mSelectedCount is only incremented/decremented

View File

@ -650,7 +650,7 @@ public class MessageView extends K9Activity implements OnClickListener
private void setupDecryptLayout() private void setupDecryptLayout()
{ {
mDecryptLayout = (View) findViewById(R.id.layout_decrypt); mDecryptLayout = findViewById(R.id.layout_decrypt);
mDecryptButton = (Button) findViewById(R.id.btn_decrypt); mDecryptButton = (Button) findViewById(R.id.btn_decrypt);
mDecryptButton.setOnClickListener(new OnClickListener() mDecryptButton.setOnClickListener(new OnClickListener()
{ {
@ -1554,7 +1554,7 @@ public class MessageView extends K9Activity implements OnClickListener
AttachmentView view = (AttachmentView)inflater.inflate(R.layout.message_view_attachment, null); AttachmentView view = (AttachmentView)inflater.inflate(R.layout.message_view_attachment, null);
if (view.populateFromPart(part, mMessage, mAccount, mController, mListener)) if (view.populateFromPart(part, mMessage, mAccount, mController, mListener))
{ {
mHandler.addAttachment((View)view); mHandler.addAttachment(view);
} }
return; return;
} }

View File

@ -512,7 +512,7 @@ public class AccountSettings extends K9PreferenceActivity
mLocalStorageProvider.setEntryValues(providerIds); mLocalStorageProvider.setEntryValues(providerIds);
mLocalStorageProvider.setEntries(providerLabels); mLocalStorageProvider.setEntries(providerLabels);
mLocalStorageProvider.setValue(mAccount.getLocalStorageProviderId()); mLocalStorageProvider.setValue(mAccount.getLocalStorageProviderId());
mLocalStorageProvider.setSummary(providers.get((Object)mAccount.getLocalStorageProviderId())); mLocalStorageProvider.setSummary(providers.get(mAccount.getLocalStorageProviderId()));
mLocalStorageProvider.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() mLocalStorageProvider.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
{ {

View File

@ -92,7 +92,7 @@ public class MimeMultipart extends Multipart
for (int i = 0, count = mParts.size(); i < count; i++) for (int i = 0, count = mParts.size(); i < count; i++)
{ {
BodyPart bodyPart = (BodyPart)mParts.get(i); BodyPart bodyPart = mParts.get(i);
writer.write("--" + mBoundary + "\r\n"); writer.write("--" + mBoundary + "\r\n");
writer.flush(); writer.flush();
bodyPart.writeTo(out); bodyPart.writeTo(out);

View File

@ -281,7 +281,7 @@ public class ImapResponseParser
{ {
if (sb.length() == 0) if (sb.length() == 0)
{ {
throw new IOException(String.format("parseAtom(): (%04x %c)", (int)ch, ch)); throw new IOException(String.format("parseAtom(): (%04x %c)", ch, ch));
} }
return sb.toString(); return sb.toString();
} }