From f212de674ed1678aa35a5c72e041e82e1f38dce6 Mon Sep 17 00:00:00 2001 From: erfanian Date: Tue, 2 Jan 2018 16:46:00 -0800 Subject: Add assisted dialing to the new call log. Bug: 70506228 Test: new unit tests PiperOrigin-RevId: 180610636 Change-Id: I7f498df1a529737bf8473584836bdc3e04a5043c --- .../android/dialer/calllog/datasources/util/RowCombiner.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'java/com/android/dialer/calllog/datasources/util/RowCombiner.java') diff --git a/java/com/android/dialer/calllog/datasources/util/RowCombiner.java b/java/com/android/dialer/calllog/datasources/util/RowCombiner.java index 8e9e9c659..ebb1ba665 100644 --- a/java/com/android/dialer/calllog/datasources/util/RowCombiner.java +++ b/java/com/android/dialer/calllog/datasources/util/RowCombiner.java @@ -73,6 +73,16 @@ public class RowCombiner { return this; } + /** Performs a bitwise OR on the specified column and yields the result. */ + public RowCombiner bitwiseOr(String columnName) { + int combinedValue = 0; + for (ContentValues val : individualRowsSortedByTimestampDesc) { + combinedValue |= val.getAsInteger(columnName); + } + combinedRow.put(columnName, combinedValue); + return this; + } + public ContentValues combine() { return combinedRow; } -- cgit v1.2.3