am 90f658e1: Merge "Preserve account list in order of creation in the database." into jb-dev
* commit '90f658e17d86d7f4052b178dbfdf15977c5d7841': Preserve account list in order of creation in the database.
This commit is contained in:
@@ -163,7 +163,8 @@ public class AccountManagerService
|
|||||||
new HashMap<Account, Integer>();
|
new HashMap<Account, Integer>();
|
||||||
private final Object cacheLock = new Object();
|
private final Object cacheLock = new Object();
|
||||||
/** protected by the {@link #cacheLock} */
|
/** protected by the {@link #cacheLock} */
|
||||||
private final HashMap<String, Account[]> accountCache = new HashMap<String, Account[]>();
|
private final HashMap<String, Account[]> accountCache =
|
||||||
|
new LinkedHashMap<String, Account[]>();
|
||||||
/** protected by the {@link #cacheLock} */
|
/** protected by the {@link #cacheLock} */
|
||||||
private HashMap<Account, HashMap<String, String>> userDataCache =
|
private HashMap<Account, HashMap<String, String>> userDataCache =
|
||||||
new HashMap<Account, HashMap<String, String>>();
|
new HashMap<Account, HashMap<String, String>>();
|
||||||
@@ -296,7 +297,7 @@ public class AccountManagerService
|
|||||||
try {
|
try {
|
||||||
accounts.accountCache.clear();
|
accounts.accountCache.clear();
|
||||||
final HashMap<String, ArrayList<String>> accountNamesByType =
|
final HashMap<String, ArrayList<String>> accountNamesByType =
|
||||||
new HashMap<String, ArrayList<String>>();
|
new LinkedHashMap<String, ArrayList<String>>();
|
||||||
while (cursor.moveToNext()) {
|
while (cursor.moveToNext()) {
|
||||||
final long accountId = cursor.getLong(0);
|
final long accountId = cursor.getLong(0);
|
||||||
final String accountType = cursor.getString(1);
|
final String accountType = cursor.getString(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user