summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSailesh Nepal <sail@google.com>2014-03-17 18:34:10 -0700
committerSailesh Nepal <sail@google.com>2014-03-17 22:48:39 -0700
commitcadc1c144bd398b0ee32f63a1ffea69259b046dc (patch)
treebdf99c04533d9873a223503b3f00ff7f63b02d2d
parent592bbf0475a5862a88870b8c8d1962be1c7cdbaf (diff)
downloadframeworks_base-cadc1c144bd398b0ee32f63a1ffea69259b046dc.zip
frameworks_base-cadc1c144bd398b0ee32f63a1ffea69259b046dc.tar.gz
frameworks_base-cadc1c144bd398b0ee32f63a1ffea69259b046dc.tar.bz2
frameworks/base: Use Uri for handle
Change-Id: I7f3163da47159d68903ce45268429f5949203589
-rw-r--r--api/current.txt4
-rw-r--r--telecomm/java/android/telecomm/CallInfo.java12
2 files changed, 9 insertions, 7 deletions
diff --git a/api/current.txt b/api/current.txt
index 8302aba..2c75d81 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -24439,9 +24439,9 @@ package android.speech.tts {
package android.telecomm {
public final class CallInfo implements android.os.Parcelable {
- ctor public CallInfo(java.lang.String, android.telecomm.CallState, java.lang.String);
+ ctor public CallInfo(java.lang.String, android.telecomm.CallState, android.net.Uri);
method public int describeContents();
- method public java.lang.String getHandle();
+ method public android.net.Uri getHandle();
method public java.lang.String getId();
method public android.telecomm.CallState getState();
method public void writeToParcel(android.os.Parcel, int);
diff --git a/telecomm/java/android/telecomm/CallInfo.java b/telecomm/java/android/telecomm/CallInfo.java
index b818e6d..b1413a6 100644
--- a/telecomm/java/android/telecomm/CallInfo.java
+++ b/telecomm/java/android/telecomm/CallInfo.java
@@ -16,8 +16,10 @@
package android.telecomm;
+import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
+import android.os.Parcelable;
import java.util.Date;
import java.util.UUID;
@@ -43,7 +45,7 @@ public final class CallInfo implements Parcelable {
* Endpoint to which the call is connected.
* This could be the dialed value for outgoing calls or the caller id of incoming calls.
*/
- private final String mHandle;
+ private final Uri mHandle;
// There are 4 timestamps that are important to a call:
// 1) Created timestamp - The time at which the user explicitly chose to make the call.
@@ -64,7 +66,7 @@ public final class CallInfo implements Parcelable {
* @param state The state of the call.
* @param handle The handle to the other party in this call.
*/
- public CallInfo(String id, CallState state, String handle) {
+ public CallInfo(String id, CallState state, Uri handle) {
mId = id;
mState = state;
mHandle = handle;
@@ -78,7 +80,7 @@ public final class CallInfo implements Parcelable {
return mState;
}
- public String getHandle() {
+ public Uri getHandle() {
return mHandle;
}
@@ -96,7 +98,7 @@ public final class CallInfo implements Parcelable {
public CallInfo createFromParcel(Parcel source) {
String id = source.readString();
CallState state = CallState.valueOf(source.readString());
- String handle = source.readString();
+ Uri handle = Uri.CREATOR.createFromParcel(source);
return new CallInfo(id, state, handle);
}
@@ -122,6 +124,6 @@ public final class CallInfo implements Parcelable {
public void writeToParcel(Parcel destination, int flags) {
destination.writeString(mId);
destination.writeString(mState.name());
- destination.writeString(mHandle);
+ mHandle.writeToParcel(destination, 0);
}
}