diff options
author | Sailesh Nepal <sail@google.com> | 2014-03-17 18:34:10 -0700 |
---|---|---|
committer | Sailesh Nepal <sail@google.com> | 2014-03-17 22:48:39 -0700 |
commit | cadc1c144bd398b0ee32f63a1ffea69259b046dc (patch) | |
tree | bdf99c04533d9873a223503b3f00ff7f63b02d2d /telecomm | |
parent | 592bbf0475a5862a88870b8c8d1962be1c7cdbaf (diff) | |
download | frameworks_base-cadc1c144bd398b0ee32f63a1ffea69259b046dc.zip frameworks_base-cadc1c144bd398b0ee32f63a1ffea69259b046dc.tar.gz frameworks_base-cadc1c144bd398b0ee32f63a1ffea69259b046dc.tar.bz2 |
frameworks/base: Use Uri for handle
Change-Id: I7f3163da47159d68903ce45268429f5949203589
Diffstat (limited to 'telecomm')
-rw-r--r-- | telecomm/java/android/telecomm/CallInfo.java | 12 |
1 files changed, 7 insertions, 5 deletions
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); } } |