1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Inlined methods that were extracted to use

@SuppressWarnings("unchecked"). That's now unnecessary after the
Serializable -> Parcelable switch
This commit is contained in:
cketti 2011-02-20 06:23:06 +01:00
parent ff1f9b5fb4
commit a79b7ea93c

View File

@ -296,11 +296,13 @@ public class MessageView extends K9Activity implements OnClickListener {
Intent intent = getIntent(); Intent intent = getIntent();
Uri uri = intent.getData(); Uri uri = intent.getData();
if (icicle != null) { if (icicle != null) {
restoreMessageReferences(icicle); mMessageReference = icicle.getParcelable(EXTRA_MESSAGE_REFERENCE);
mMessageReferences = icicle.getParcelableArrayList(EXTRA_MESSAGE_REFERENCES);
mPgpData = (PgpData) icicle.getSerializable(STATE_PGP_DATA); mPgpData = (PgpData) icicle.getSerializable(STATE_PGP_DATA);
} else { } else {
if (uri == null) { if (uri == null) {
restoreMessageReferencesExtra(intent); mMessageReference = intent.getParcelableExtra(EXTRA_MESSAGE_REFERENCE);
mMessageReferences = intent.getParcelableArrayListExtra(EXTRA_MESSAGE_REFERENCES);
} else { } else {
List<String> segmentList = uri.getPathSegments(); List<String> segmentList = uri.getPathSegments();
if (segmentList.size() != 3) { if (segmentList.size() != 3) {
@ -346,16 +348,6 @@ public class MessageView extends K9Activity implements OnClickListener {
displayMessage(mMessageReference); displayMessage(mMessageReference);
} }
private void restoreMessageReferences(Bundle icicle) {
mMessageReference = icicle.getParcelable(EXTRA_MESSAGE_REFERENCE);
mMessageReferences = icicle.getParcelableArrayList(EXTRA_MESSAGE_REFERENCES);
}
private void restoreMessageReferencesExtra(Intent intent) {
mMessageReference = intent.getParcelableExtra(EXTRA_MESSAGE_REFERENCE);
mMessageReferences = intent.getParcelableArrayListExtra(EXTRA_MESSAGE_REFERENCES);
}
private void setupButtonViews() { private void setupButtonViews() {
setOnClickListener(R.id.from); setOnClickListener(R.id.from);
setOnClickListener(R.id.reply); setOnClickListener(R.id.reply);