From e841eabd475f515b96349b85b48ae00ac6603d3f Mon Sep 17 00:00:00 2001 From: zachh Date: Thu, 9 Nov 2017 18:33:11 -0800 Subject: Added content provider for PhoneLookupHistory. Bug: 34672501 Test: yes PiperOrigin-RevId: 175243488 Change-Id: Iec3b5eb0e81f6e6cc04c64c3ea65c9c7fcb33fe3 --- .../contract/PhoneLookupHistoryContract.java | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 java/com/android/dialer/phonelookup/database/contract/PhoneLookupHistoryContract.java (limited to 'java/com/android/dialer/phonelookup/database/contract/PhoneLookupHistoryContract.java') diff --git a/java/com/android/dialer/phonelookup/database/contract/PhoneLookupHistoryContract.java b/java/com/android/dialer/phonelookup/database/contract/PhoneLookupHistoryContract.java new file mode 100644 index 000000000..f8e108496 --- /dev/null +++ b/java/com/android/dialer/phonelookup/database/contract/PhoneLookupHistoryContract.java @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.dialer.phonelookup.database.contract; + +import android.net.Uri; +import com.android.dialer.constants.Constants; + +/** Contract for the PhoneLookupHistory content provider. */ +public class PhoneLookupHistoryContract { + public static final String AUTHORITY = Constants.get().getPhoneLookupHistoryProviderAuthority(); + + public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY); + + /** PhoneLookupHistory table. */ + public static final class PhoneLookupHistory { + + public static final String TABLE = "PhoneLookupHistory"; + + /** The content URI for this table. */ + public static final Uri CONTENT_URI = + Uri.withAppendedPath(PhoneLookupHistoryContract.CONTENT_URI, TABLE); + + /** The MIME type of a {@link android.content.ContentProvider#getType(Uri)} single entry. */ + public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone_lookup_history"; + + /** + * The phone number's E164 representation if it has one, or otherwise normalized number if it + * cannot be normalized to E164. Required, primary key for the table. + * + *

Type: TEXT + */ + public static final String NORMALIZED_NUMBER = "normalized_number"; + + /** + * The {@link com.android.dialer.phonelookup.PhoneLookupInfo} proto for the number. Required. + * + *

Type: BLOB + */ + public static final String PHONE_LOOKUP_INFO = "phone_lookup_info"; + + /** + * Epoch time in milliseconds this entry was last modified. Required. + * + *

Type: INTEGER (long) + */ + public static final String LAST_MODIFIED = "last_modified"; + } +} -- cgit v1.2.3