Projections.java revision 2f1c7586bcce334ca69022eb8dc6d8965ceb6a05
1/*
2 * Copyright (C) 2017 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
17package com.android.dialer.searchfragment.common;
18
19import android.provider.ContactsContract.CommonDataKinds.Phone;
20
21/** Class containing relevant projections for searching contacts. */
22public class Projections {
23
24  public static final int PHONE_ID = 0;
25  public static final int PHONE_TYPE = 1;
26  public static final int PHONE_LABEL = 2;
27  public static final int PHONE_NUMBER = 3;
28  public static final int PHONE_DISPLAY_NAME = 4;
29  public static final int PHONE_PHOTO_ID = 5;
30  public static final int PHONE_PHOTO_URI = 6;
31  public static final int PHONE_LOOKUP_KEY = 7;
32  public static final int PHONE_CARRIER_PRESENCE = 8;
33
34  @SuppressWarnings("unused")
35  public static final int PHONE_SORT_KEY = 9;
36
37  public static final String[] PHONE_PROJECTION =
38      new String[] {
39        Phone._ID, // 0
40        Phone.TYPE, // 1
41        Phone.LABEL, // 2
42        Phone.NUMBER, // 3
43        Phone.DISPLAY_NAME_PRIMARY, // 4
44        Phone.PHOTO_ID, // 5
45        Phone.PHOTO_THUMBNAIL_URI, // 6
46        Phone.LOOKUP_KEY, // 7
47        Phone.CARRIER_PRESENCE, // 8
48        Phone.SORT_KEY_PRIMARY // 9
49      };
50}
51