Skip to content
Commit 85e90d09 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

New argument to hint at locale to use for sorting.

We've heard that some developers want more detailed influence over
the sort order applied internally inside of a ContentProvider.  For
example, when the locale is "zh", the caller may want to sort using
either "pinyin" or "zhuyin" style collations.

Thankfully ICU already supports this type of collation control when
creating a ULocale object, and it also supports other useful types
such as "de@collation=phonebook".  Thus this CL adds a new
QUERY_ARG_SORT_LOCALE that can be used to pass an ICU locale string
into a ContentProvider.

Similar to the other existing query arguments, we know that only
certain providers may support this new option, so we document that
it should be included in EXTRA_HONORED_ARGS when applied.

Bug: 140248907
Test: atest cts/tests/tests/content/src/android/content/cts/ContentResolverTest.java
Change-Id: I3277725ecd21a58680f2b8a5cc62514184d9e179
parent 74ccee9f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment