summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllog/database
diff options
context:
space:
mode:
authorzachh <zachh@google.com>2018-01-09 17:29:06 -0800
committerCopybara-Service <copybara-piper@google.com>2018-01-09 18:27:41 -0800
commitff88f7bbe07fb3e267af49427adf1a91e3fc21e9 (patch)
tree34211b16307c159d1726bddc0ec2e2468f66981d /java/com/android/dialer/calllog/database
parent9f8d0676caa3a00849fa18def2996399ee1bc708 (diff)
Added RealtimeRowProcessor.
This is for performing work inside of the call log's RecyclerView, when the view holder is bound. Most of the time, this should be a no-op but there are possible edge cases where the call log data cannot be updated efficiently through the standard batch mechanism. One example of this is when there are too many invalid numbers in the call log; the CP2 information for invalid numbers cannot be efficiently batch updated so we fetch this information at display time. (Note that we do handle up to 5 invalid numbers in the batch update mechanism, but if there are more than that we fallback to this realtime processing.) Test: unit, manual PiperOrigin-RevId: 181400016 Change-Id: Iea6b380742e757b48d19f319fe46dc5fae837604
Diffstat (limited to 'java/com/android/dialer/calllog/database')
-rw-r--r--java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java3
-rw-r--r--java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java10
2 files changed, 11 insertions, 2 deletions
diff --git a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java
index 68d4b95df..f90d657b8 100644
--- a/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java
+++ b/java/com/android/dialer/calllog/database/AnnotatedCallLogDatabaseHelper.java
@@ -60,7 +60,8 @@ class AnnotatedCallLogDatabaseHelper extends SQLiteOpenHelper {
+ (AnnotatedCallLog.TRANSCRIPTION + " integer, ")
+ (AnnotatedCallLog.VOICEMAIL_URI + " text, ")
+ (AnnotatedCallLog.CALL_TYPE + " integer, ")
- + (AnnotatedCallLog.CAN_REPORT_AS_INVALID_NUMBER + " integer")
+ + (AnnotatedCallLog.CAN_REPORT_AS_INVALID_NUMBER + " integer, ")
+ + (AnnotatedCallLog.CP2_INFO_INCOMPLETE + " integer")
+ ");";
/** Deletes all but the first maxRows rows (by timestamp) to keep the table a manageable size. */
diff --git a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
index 1b3e09095..9161d6087 100644
--- a/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
+++ b/java/com/android/dialer/calllog/database/contract/AnnotatedCallLogContract.java
@@ -185,6 +185,13 @@ public class AnnotatedCallLogContract {
*/
String CAN_REPORT_AS_INVALID_NUMBER = "can_report_as_invalid_number";
+ /**
+ * True if the CP2 information is incomplete and needs to be queried at display time.
+ *
+ * <p>TYPE: INTEGER (boolean)
+ */
+ String CP2_INFO_INCOMPLETE = "cp2_info_incomplete";
+
String[] ALL_COMMON_COLUMNS =
new String[] {
_ID,
@@ -207,7 +214,8 @@ public class AnnotatedCallLogContract {
IS_BUSINESS,
IS_VOICEMAIL,
CALL_TYPE,
- CAN_REPORT_AS_INVALID_NUMBER
+ CAN_REPORT_AS_INVALID_NUMBER,
+ CP2_INFO_INCOMPLETE
};
}