am 5c0c5575: Merge "Use LOCALIZED collation for mailbox names"

* commit '5c0c5575676ec73404fa70fc705e3f6476822064':
  Use LOCALIZED collation for mailbox names
This commit is contained in:
Marc Blank 2011-12-07 18:02:07 -08:00 committed by Android Git Automerger
commit 5d9d49f126
4 changed files with 6 additions and 5 deletions

View File

@ -157,7 +157,7 @@ class MailboxFragmentAdapter extends CursorAdapter {
+ " WHEN " + Mailbox.TYPE_JUNK + " THEN 5"
// Other mailboxes (i.e. of Mailbox.TYPE_MAIL) are shown in alphabetical order.
+ " ELSE 10 END"
+ " ," + MailboxColumns.DISPLAY_NAME;
+ " ," + MailboxColumns.DISPLAY_NAME + " COLLATE LOCALIZED ASC";
/** View is of a "normal" row */
private static final int ITEM_VIEW_TYPE_NORMAL = 0;

View File

@ -83,12 +83,12 @@ class MailboxMoveToAdapter extends CursorAdapter {
private static final String MOVE_TO_ORDER_BY_SERVER_ID =
MOVE_TO_ORDER_BY_STATIC
// All other mailboxes are shown in alphabetical order.
+ ", " + MailboxColumns.SERVER_ID;
+ ", " + MailboxColumns.SERVER_ID + " COLLATE LOCALIZED ASC";
/** Display name sort order */
private static final String MOVE_TO_ORDER_BY_DISPLAY_NAME =
MOVE_TO_ORDER_BY_STATIC
// All other mailboxes are shown in alphabetical order.
+ ", " + MailboxColumns.DISPLAY_NAME;
+ ", " + MailboxColumns.DISPLAY_NAME + " COLLATE LOCALIZED ASC";
// Column 0 is only for ListView; we don't use it in our code.
private static final int COLUMN_ID = 1;

View File

@ -42,7 +42,8 @@ public class RecentMailboxManager {
@VisibleForTesting
static RecentMailboxManager sInstance;
public static String RECENT_MAILBOXES_SORT_ORDER = MailboxColumns.DISPLAY_NAME;
public static String RECENT_MAILBOXES_SORT_ORDER =
MailboxColumns.DISPLAY_NAME + " COLLATE LOCALIZED ASC";
/** The maximum number of results to retrieve */
private static final int LIMIT_RESULTS = 5;

View File

@ -380,7 +380,7 @@ public abstract class ShortcutPickerFragment extends ListFragment
final String selection;
if (recvAuth.isEasConnection()) {
projection = EAS_PROJECTION;
orderBy = MailboxColumns.DISPLAY_NAME;
orderBy = MailboxColumns.DISPLAY_NAME + " COLLATE LOCALIZED ASC";
} else {
projection = IMAP_PROJECTION;
orderBy = MailboxColumns.SERVER_ID;