Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48fcd4e1 authored by Marvin Paul's avatar Marvin Paul
Browse files

Added explicit sort order when fetching accounts.

In SQLite, if a sort order is not specified then the ordering is
undefined. In pre-L, SQLite would order accounts by the primary key.
But in L, the newer SQLite version appears to be ordering accounts by
the name.

Bug 18453759

Change-Id: I6bf2b0de59eca4c69472b4279b9e4194c3d3471e
parent 1b26cc5b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ public class AccountManagerService
            boolean accountDeleted = false;
            Cursor cursor = db.query(TABLE_ACCOUNTS,
                    new String[]{ACCOUNTS_ID, ACCOUNTS_TYPE, ACCOUNTS_NAME},
                    null, null, null, null, null);
                    null, null, null, null, ACCOUNTS_ID);
            try {
                accounts.accountCache.clear();
                final HashMap<String, ArrayList<String>> accountNamesByType =