summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android/telecom/Voicemail.java
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2015-03-13 17:29:40 -0700
committerNancy Chen <nancychen@google.com>2015-03-18 20:49:23 -0700
commitd3e28b78a3107dd5eb00ac3f6130d9fcbc2116ad (patch)
tree62540759a797bea5e3d48830781b1ef570cabee1 /telecomm/java/android/telecom/Voicemail.java
parent4d87285c317d7ee6febbe5cc2b8eb0ca83eb9681 (diff)
downloadframeworks_base-d3e28b78a3107dd5eb00ac3f6130d9fcbc2116ad.zip
frameworks_base-d3e28b78a3107dd5eb00ac3f6130d9fcbc2116ad.tar.gz
frameworks_base-d3e28b78a3107dd5eb00ac3f6130d9fcbc2116ad.tar.bz2
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
Diffstat (limited to 'telecomm/java/android/telecom/Voicemail.java')
-rw-r--r--telecomm/java/android/telecom/Voicemail.java10
1 files changed, 10 insertions, 0 deletions
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).
+ * <p>
+ * 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.
* <p>