summaryrefslogtreecommitdiffstats
path: root/telecomm/java
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2015-07-17 16:50:52 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-17 16:50:52 +0000
commitce9fea390c86f4e7725d2f7486cf97d56fdda5df (patch)
treec9ce72fbdda48beb7a9ad5fadcf61195d2c1beb2 /telecomm/java
parent3337693c784c2495c3563295687de7f8f764eaf1 (diff)
parent660322d8259cb256745f15219af0b9004063ea8d (diff)
downloadframeworks_base-ce9fea390c86f4e7725d2f7486cf97d56fdda5df.zip
frameworks_base-ce9fea390c86f4e7725d2f7486cf97d56fdda5df.tar.gz
frameworks_base-ce9fea390c86f4e7725d2f7486cf97d56fdda5df.tar.bz2
am 660322d8: Merge "Add transcription field to voicemail object and related changes." into mnc-dev
* commit '660322d8259cb256745f15219af0b9004063ea8d': Add transcription field to voicemail object and related changes.
Diffstat (limited to 'telecomm/java')
-rw-r--r--telecomm/java/android/telecom/Voicemail.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/telecomm/java/android/telecom/Voicemail.java b/telecomm/java/android/telecom/Voicemail.java
index 151917e..ca235bf 100644
--- a/telecomm/java/android/telecom/Voicemail.java
+++ b/telecomm/java/android/telecom/Voicemail.java
@@ -36,10 +36,11 @@ public class Voicemail implements Parcelable {
private final Uri mUri;
private final Boolean mIsRead;
private final Boolean mHasContent;
+ private final String mTranscription;
private Voicemail(Long timestamp, String number, PhoneAccountHandle phoneAccountHandle, Long id,
Long duration, String source, String providerData, Uri uri, Boolean isRead,
- Boolean hasContent) {
+ Boolean hasContent, String transcription) {
mTimestamp = timestamp;
mNumber = number;
mPhoneAccount = phoneAccountHandle;
@@ -50,6 +51,7 @@ public class Voicemail implements Parcelable {
mUri = uri;
mIsRead = isRead;
mHasContent = hasContent;
+ mTranscription = transcription;
}
/**
@@ -88,6 +90,7 @@ public class Voicemail implements Parcelable {
private Uri mBuilderUri;
private Boolean mBuilderIsRead;
private boolean mBuilderHasContent;
+ private String mBuilderTranscription;
/** You should use the correct factory method to construct a builder. */
private Builder() {
@@ -143,6 +146,11 @@ public class Voicemail implements Parcelable {
return this;
}
+ public Builder setTranscription(String transcription) {
+ mBuilderTranscription = transcription;
+ return this;
+ }
+
public Voicemail build() {
mBuilderId = mBuilderId == null ? -1 : mBuilderId;
mBuilderTimestamp = mBuilderTimestamp == null ? 0 : mBuilderTimestamp;
@@ -150,7 +158,7 @@ public class Voicemail implements Parcelable {
mBuilderIsRead = mBuilderIsRead == null ? false : mBuilderIsRead;
return new Voicemail(mBuilderTimestamp, mBuilderNumber, mBuilderPhoneAccount,
mBuilderId, mBuilderDuration, mBuilderSourcePackage, mBuilderSourceData,
- mBuilderUri, mBuilderIsRead, mBuilderHasContent);
+ mBuilderUri, mBuilderIsRead, mBuilderHasContent, mBuilderTranscription);
}
}
@@ -230,6 +238,13 @@ public class Voicemail implements Parcelable {
return mHasContent;
}
+ /**
+ * Returns the text transcription of this voicemail, or null if this field is not set.
+ */
+ public String getTranscription() {
+ return mTranscription;
+ }
+
@Override
public int describeContents() {
return 0;
@@ -265,6 +280,7 @@ public class Voicemail implements Parcelable {
} else {
dest.writeInt(0);
}
+ dest.writeCharSequence(mTranscription);
}
public static final Creator<Voicemail> CREATOR
@@ -299,5 +315,6 @@ public class Voicemail implements Parcelable {
}
mIsRead = in.readInt() > 0 ? true : false;
mHasContent = in.readInt() > 0 ? true : false;
+ mTranscription = (String) in.readCharSequence();
}
}