diff options
author | erfanian <erfanian@google.com> | 2018-01-02 16:46:00 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-02 16:48:03 -0800 |
commit | f212de674ed1678aa35a5c72e041e82e1f38dce6 (patch) | |
tree | 484de8c21bcfd61f299013a318d915cd2f29bcb1 /java/com/android/dialer/calllog/datasources/util/RowCombiner.java | |
parent | f473e1d0988bb13874a0774db9cbcd66777f9150 (diff) |
Add assisted dialing to the new call log.
Bug: 70506228
Test: new unit tests
PiperOrigin-RevId: 180610636
Change-Id: I7f498df1a529737bf8473584836bdc3e04a5043c
Diffstat (limited to 'java/com/android/dialer/calllog/datasources/util/RowCombiner.java')
-rw-r--r-- | java/com/android/dialer/calllog/datasources/util/RowCombiner.java | 10 |
1 files changed, 10 insertions, 0 deletions
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; } |