1ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann/* 2ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * Copyright (C) 2010 The Android Open Source Project 3ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * 4ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * Licensed under the Apache License, Version 2.0 (the "License"); 5ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * you may not use this file except in compliance with the License. 6ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * You may obtain a copy of the License at 7ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * 8ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * http://www.apache.org/licenses/LICENSE-2.0 9ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * 10ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * Unless required by applicable law or agreed to in writing, software 11ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * distributed under the License is distributed on an "AS IS" BASIS, 12ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * See the License for the specific language governing permissions and 14ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * limitations under the License. 15ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann */ 16ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann 17ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmannpackage com.android.contacts.util; 18ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann 19ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmannimport java.text.Collator; 20ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmannimport java.util.Locale; 21ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann 22ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann/** 23ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * Returns the collator that can be used to sort contact list entries. This 24ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann * collator is the same as the one that is used in sqlite. 25ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann */ 26ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmannpublic final class PhonebookCollatorFactory { 27ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann public static final Collator getCollator() { 2862e217c4802b480bc27b4a051fdf6569ab0c700dJay Shrauner return Collator.getInstance(Locale.getDefault()); 29ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann } 30ae2bbe84b4d05e613863120aac0dff8fa099db02Daniel Lehmann} 31