• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2015 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.inputmethod.latin;
18 
19 import android.provider.BaseColumns;
20 import android.provider.ContactsContract.Contacts;
21 
22 /**
23  * Constants related to Contacts Content Provider.
24  */
25 public class ContactsDictionaryConstants {
26     /**
27      * Projections for {@link Contacts.CONTENT_URI}
28      */
29     public static final String[] PROJECTION = { BaseColumns._ID, Contacts.DISPLAY_NAME,
30             Contacts.TIMES_CONTACTED, Contacts.LAST_TIME_CONTACTED, Contacts.IN_VISIBLE_GROUP };
31     public static final String[] PROJECTION_ID_ONLY = { BaseColumns._ID };
32 
33     /**
34      * Frequency for contacts information into the dictionary
35      */
36     public static final int FREQUENCY_FOR_CONTACTS = 40;
37     public static final int FREQUENCY_FOR_CONTACTS_BIGRAM = 90;
38 
39     /**
40      *  Do not attempt to query contacts if there are more than this many entries.
41      */
42     public static final int MAX_CONTACTS_PROVIDER_QUERY_LIMIT = 10000;
43 
44     /**
45      * Index of the column for 'name' in content providers:
46      * Contacts & ContactsContract.Profile.
47      */
48     public static final int NAME_INDEX = 1;
49     public static final int TIMES_CONTACTED_INDEX = 2;
50     public static final int LAST_TIME_CONTACTED_INDEX = 3;
51     public static final int IN_VISIBLE_GROUP_INDEX = 4;
52 }
53