summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/phonelookup/database/contract/PhoneLookupHistoryContract.java
diff options
context:
space:
mode:
authorzachh <zachh@google.com>2017-11-09 18:33:11 -0800
committerZachary Heidepriem <zachh@google.com>2017-11-11 20:24:00 -0800
commite841eabd475f515b96349b85b48ae00ac6603d3f (patch)
tree511dffefb35d5b1a4b149cd4bef45f8ec318c5a9 /java/com/android/dialer/phonelookup/database/contract/PhoneLookupHistoryContract.java
parentefd5f75eaf20473b34dd19fa259c7fd6525ff9b4 (diff)
Added content provider for PhoneLookupHistory.
Bug: 34672501 Test: yes PiperOrigin-RevId: 175243488 Change-Id: Iec3b5eb0e81f6e6cc04c64c3ea65c9c7fcb33fe3
Diffstat (limited to 'java/com/android/dialer/phonelookup/database/contract/PhoneLookupHistoryContract.java')
-rw-r--r--java/com/android/dialer/phonelookup/database/contract/PhoneLookupHistoryContract.java62
1 files changed, 62 insertions, 0 deletions
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.
+ *
+ * <p>Type: TEXT
+ */
+ public static final String NORMALIZED_NUMBER = "normalized_number";
+
+ /**
+ * The {@link com.android.dialer.phonelookup.PhoneLookupInfo} proto for the number. Required.
+ *
+ * <p>Type: BLOB
+ */
+ public static final String PHONE_LOOKUP_INFO = "phone_lookup_info";
+
+ /**
+ * Epoch time in milliseconds this entry was last modified. Required.
+ *
+ * <p>Type: INTEGER (long)
+ */
+ public static final String LAST_MODIFIED = "last_modified";
+ }
+}