1 /* 2 * Copyright (C) 2011 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.dialer.calllog; 18 19 import android.database.Cursor; 20 import android.provider.CallLog.Calls; 21 22 /** 23 * The query for the call log table. 24 */ 25 public final class CallLogQuery { 26 // If you alter this, you must also alter the method that inserts a fake row to the headers 27 // in the CallLogQueryHandler class called createHeaderCursorFor(). 28 public static final String[] _PROJECTION = new String[] { 29 Calls._ID, // 0 30 Calls.NUMBER, // 1 31 Calls.DATE, // 2 32 Calls.DURATION, // 3 33 Calls.TYPE, // 4 34 Calls.COUNTRY_ISO, // 5 35 Calls.VOICEMAIL_URI, // 6 36 Calls.GEOCODED_LOCATION, // 7 37 Calls.CACHED_NAME, // 8 38 Calls.CACHED_NUMBER_TYPE, // 9 39 Calls.CACHED_NUMBER_LABEL, // 10 40 Calls.CACHED_LOOKUP_URI, // 11 41 Calls.CACHED_MATCHED_NUMBER, // 12 42 Calls.CACHED_NORMALIZED_NUMBER, // 13 43 Calls.CACHED_PHOTO_ID, // 14 44 Calls.CACHED_FORMATTED_NUMBER, // 15 45 Calls.IS_READ, // 16 46 Calls.NUMBER_PRESENTATION, // 17 47 }; 48 49 public static final int ID = 0; 50 public static final int NUMBER = 1; 51 public static final int DATE = 2; 52 public static final int DURATION = 3; 53 public static final int CALL_TYPE = 4; 54 public static final int COUNTRY_ISO = 5; 55 public static final int VOICEMAIL_URI = 6; 56 public static final int GEOCODED_LOCATION = 7; 57 public static final int CACHED_NAME = 8; 58 public static final int CACHED_NUMBER_TYPE = 9; 59 public static final int CACHED_NUMBER_LABEL = 10; 60 public static final int CACHED_LOOKUP_URI = 11; 61 public static final int CACHED_MATCHED_NUMBER = 12; 62 public static final int CACHED_NORMALIZED_NUMBER = 13; 63 public static final int CACHED_PHOTO_ID = 14; 64 public static final int CACHED_FORMATTED_NUMBER = 15; 65 public static final int IS_READ = 16; 66 public static final int NUMBER_PRESENTATION = 17; 67 } 68