From d3e28b78a3107dd5eb00ac3f6130d9fcbc2116ad Mon Sep 17 00:00:00 2001 From: Nancy Chen Date: Fri, 13 Mar 2015 17:29:40 -0700 Subject: Add voicemail builder method for updating/syncing. The id of the voicemail is necessary to update a voicemail in the database and the source data (or unique remote identifier for the voicemail) is necessary for syncing remotely. Whenever performing a sync either of data to the server or vise versa, create a voicemail object using this new method. Bug: 19236241 Change-Id: Ibc1fd8c1922be13605987d9a3dcd327c438951c8 --- telecomm/java/android/telecom/Voicemail.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'telecomm/java/android/telecom/Voicemail.java') diff --git a/telecomm/java/android/telecom/Voicemail.java b/telecomm/java/android/telecom/Voicemail.java index 864c6b1..a884c5f 100644 --- a/telecomm/java/android/telecom/Voicemail.java +++ b/telecomm/java/android/telecom/Voicemail.java @@ -57,6 +57,16 @@ public class Voicemail implements Parcelable { } /** + * Create a {@link Builder} for a {@link Voicemail} to be updated (or deleted). + *

+ * The id and source data fields are mandatory for update - id is necessary for updating the + * database and source data is necessary for updating the server. + */ + public static Builder createForUpdate(long id, String sourceData) { + return new Builder().setId(id).setSourceData(sourceData); + } + + /** * Builder pattern for creating a {@link Voicemail}. The builder must be created with the * {@link #createForInsertion(long, String)} method. *

-- cgit v1.1