diff options
Diffstat (limited to 'java/com/android/dialer/calllog/model')
-rw-r--r-- | java/com/android/dialer/calllog/model/CoalescedRow.java | 13 | ||||
-rw-r--r-- | java/com/android/dialer/calllog/model/coalesced_ids.proto | 30 |
2 files changed, 36 insertions, 7 deletions
diff --git a/java/com/android/dialer/calllog/model/CoalescedRow.java b/java/com/android/dialer/calllog/model/CoalescedRow.java index 091467430..5cc056872 100644 --- a/java/com/android/dialer/calllog/model/CoalescedRow.java +++ b/java/com/android/dialer/calllog/model/CoalescedRow.java @@ -17,8 +17,8 @@ package com.android.dialer.calllog.model; import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import com.android.dialer.CoalescedIds; import com.android.dialer.DialerPhoneNumber; import com.google.auto.value.AutoValue; @@ -38,15 +38,14 @@ public abstract class CoalescedRow { .setFeatures(0) .setIsBusiness(false) .setIsVoicemail(false) - .setNumberCalls(0) - .setCallType(0); + .setCallType(0) + .setCoalescedIds(CoalescedIds.getDefaultInstance()); } public abstract int id(); public abstract long timestamp(); - @NonNull public abstract DialerPhoneNumber number(); @Nullable @@ -93,7 +92,7 @@ public abstract class CoalescedRow { public abstract int callType(); - public abstract int numberCalls(); + public abstract CoalescedIds coalescedIds(); /** Builder for {@link CoalescedRow}. */ @AutoValue.Builder @@ -103,7 +102,7 @@ public abstract class CoalescedRow { public abstract Builder setTimestamp(long timestamp); - public abstract Builder setNumber(@NonNull DialerPhoneNumber number); + public abstract Builder setNumber(DialerPhoneNumber number); public abstract Builder setName(@Nullable String name); @@ -140,7 +139,7 @@ public abstract class CoalescedRow { public abstract Builder setCallType(int callType); - public abstract Builder setNumberCalls(int numberCalls); + public abstract Builder setCoalescedIds(CoalescedIds coalescedIds); public abstract CoalescedRow build(); } diff --git a/java/com/android/dialer/calllog/model/coalesced_ids.proto b/java/com/android/dialer/calllog/model/coalesced_ids.proto new file mode 100644 index 000000000..059f95782 --- /dev/null +++ b/java/com/android/dialer/calllog/model/coalesced_ids.proto @@ -0,0 +1,30 @@ +// 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 + +syntax = "proto2"; + +option java_package = "com.android.dialer"; +option java_multiple_files = true; +option optimize_for = LITE_RUNTIME; + + +package com.android.dialer; + +// A proto containing a list of IDs of the rows in AnnotatedCallLog that are +// coalesced into a row in CoalescedAnnotatedCallLog. +// For example, if rows in the AnnotatedCallLog with IDs 123, 124, 125 are +// coalesced into one row, the list in the proto will be [123, 124, 125]. +message CoalescedIds { + repeated int64 coalesced_id = 1; +}
\ No newline at end of file |