zachh | e841eab | 2017-11-09 18:33:11 -0800 | [diff] [blame^] | 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 | |
| 17 | package com.android.dialer.phonelookup.database.contract; |
| 18 | |
| 19 | import android.net.Uri; |
| 20 | import com.android.dialer.constants.Constants; |
| 21 | |
| 22 | /** Contract for the PhoneLookupHistory content provider. */ |
| 23 | public class PhoneLookupHistoryContract { |
| 24 | public static final String AUTHORITY = Constants.get().getPhoneLookupHistoryProviderAuthority(); |
| 25 | |
| 26 | public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY); |
| 27 | |
| 28 | /** PhoneLookupHistory table. */ |
| 29 | public static final class PhoneLookupHistory { |
| 30 | |
| 31 | public static final String TABLE = "PhoneLookupHistory"; |
| 32 | |
| 33 | /** The content URI for this table. */ |
| 34 | public static final Uri CONTENT_URI = |
| 35 | Uri.withAppendedPath(PhoneLookupHistoryContract.CONTENT_URI, TABLE); |
| 36 | |
| 37 | /** The MIME type of a {@link android.content.ContentProvider#getType(Uri)} single entry. */ |
| 38 | public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone_lookup_history"; |
| 39 | |
| 40 | /** |
| 41 | * The phone number's E164 representation if it has one, or otherwise normalized number if it |
| 42 | * cannot be normalized to E164. Required, primary key for the table. |
| 43 | * |
| 44 | * <p>Type: TEXT |
| 45 | */ |
| 46 | public static final String NORMALIZED_NUMBER = "normalized_number"; |
| 47 | |
| 48 | /** |
| 49 | * The {@link com.android.dialer.phonelookup.PhoneLookupInfo} proto for the number. Required. |
| 50 | * |
| 51 | * <p>Type: BLOB |
| 52 | */ |
| 53 | public static final String PHONE_LOOKUP_INFO = "phone_lookup_info"; |
| 54 | |
| 55 | /** |
| 56 | * Epoch time in milliseconds this entry was last modified. Required. |
| 57 | * |
| 58 | * <p>Type: INTEGER (long) |
| 59 | */ |
| 60 | public static final String LAST_MODIFIED = "last_modified"; |
| 61 | } |
| 62 | } |