summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ParcelableCall.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2020-04-13 17:19:24 -0700
committerTyler Gunn <tgunn@google.com>2020-04-13 17:19:24 -0700
commit7c61306fa5710aadd148de21ab71c12739ae920d (patch)
tree2cf3accc614b33fd70ff27feed68b205d96bf7a3 /telecomm/java/android/telecom/ParcelableCall.java
parentbcc707d44c8d99527aa71b8bef97c22446bf9614 (diff)
Fix parceling and unparceling for URIs in Telecom.
When testing parceling and unparceling of numbers with postdial digits it appears in parcelling to the dialer there were some cases where the commas were being URL encoded during parceling. Elsewhere in the platform the Uri.writeToParcel and Uri.CREATOR.createFromParcel methods are used. Switching to those methods ensured that the parceling did not uri-encode on parcel/unparcel. GatewayInfo already used the right method to unparcel. Test: Unit/CTS tests. Fixes: 152172598 Change-Id: I32b7d049107cb3901fd934dc609541d1d2622a5a
Diffstat (limited to 'telecomm/java/android/telecom/ParcelableCall.java')
-rw-r--r--telecomm/java/android/telecom/ParcelableCall.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/telecomm/java/android/telecom/ParcelableCall.java b/telecomm/java/android/telecom/ParcelableCall.java
index 415a817b58d5..182dc8bb8325 100644
--- a/telecomm/java/android/telecom/ParcelableCall.java
+++ b/telecomm/java/android/telecom/ParcelableCall.java
@@ -629,7 +629,7 @@ public final class ParcelableCall implements Parcelable {
int capabilities = source.readInt();
int properties = source.readInt();
long connectTimeMillis = source.readLong();
- Uri handle = source.readParcelable(classLoader);
+ Uri handle = Uri.CREATOR.createFromParcel(source);
int handlePresentation = source.readInt();
String callerDisplayName = source.readString();
int callerDisplayNamePresentation = source.readInt();
@@ -711,7 +711,7 @@ public final class ParcelableCall implements Parcelable {
destination.writeInt(mCapabilities);
destination.writeInt(mProperties);
destination.writeLong(mConnectTimeMillis);
- destination.writeParcelable(mHandle, 0);
+ Uri.writeToParcel(destination, mHandle);
destination.writeInt(mHandlePresentation);
destination.writeString(mCallerDisplayName);
destination.writeInt(mCallerDisplayNamePresentation);