1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

Issue 262

ConcurrentHashMap seems to serialize as a HashMap.  Not sure why or
how.

This change has re-enabled the saving of the unread counts during an
orientation change, giving somewhat fast response.  If it fails again,
just comment out the block of code.
This commit is contained in:
Daniel Applebaum 2009-02-10 04:11:34 +00:00
parent 3e4843e756
commit ca9d220a52

View File

@ -1,6 +1,7 @@
package com.android.email.activity; package com.android.email.activity;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import android.app.AlertDialog; import android.app.AlertDialog;
@ -186,15 +187,15 @@ public class Accounts extends ListActivity implements OnItemClickListener, OnCli
if (icicle != null && icicle.containsKey(SELECTED_CONTEXT_ACCOUNT)) { if (icicle != null && icicle.containsKey(SELECTED_CONTEXT_ACCOUNT)) {
mSelectedContextAccount = (Account) icicle.getSerializable("selectedContextAccount"); mSelectedContextAccount = (Account) icicle.getSerializable("selectedContextAccount");
} }
/*
if (icicle != null) if (icicle != null)
{ {
ConcurrentHashMap<String, Integer> oldUnreadMessageCounts = Map<String, Integer> oldUnreadMessageCounts =
(ConcurrentHashMap<String, Integer>)icicle.get(UNREAD_MESSAGE_COUNTS); (Map<String, Integer>)icicle.get(UNREAD_MESSAGE_COUNTS);
if (oldUnreadMessageCounts != null) { if (oldUnreadMessageCounts != null) {
unreadMessageCounts.putAll(oldUnreadMessageCounts); unreadMessageCounts.putAll(oldUnreadMessageCounts);
} }
}*/ }
} }
@Override @Override