diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-01-03 02:41:22 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-01-03 02:41:22 +0000 |
commit | 15fd7535818344e905745b390a1b4098ca4d2cf1 (patch) | |
tree | 484de8c21bcfd61f299013a318d915cd2f29bcb1 /java/com/android/dialer/calllog/datasources/util/RowCombiner.java | |
parent | ae140ba6eee4164f6856d33635cc15414c2db40b (diff) | |
parent | f212de674ed1678aa35a5c72e041e82e1f38dce6 (diff) |
Merge "Add assisted dialing to the new call log."
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; } |