summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tyler Gunn <tgunn@google.com> 2020-04-13 17:19:24 -0700
committer Tyler Gunn <tgunn@google.com> 2020-04-13 17:19:24 -0700
commit7c61306fa5710aadd148de21ab71c12739ae920d (patch)
tree2cf3accc614b33fd70ff27feed68b205d96bf7a3
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
-rw-r--r--telecomm/java/android/telecom/GatewayInfo.java4
-rw-r--r--telecomm/java/android/telecom/ParcelableCall.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/telecomm/java/android/telecom/GatewayInfo.java b/telecomm/java/android/telecom/GatewayInfo.java
index 0faa4fd2027a..31c24d54918a 100644
--- a/telecomm/java/android/telecom/GatewayInfo.java
+++ b/telecomm/java/android/telecom/GatewayInfo.java
@@ -111,7 +111,7 @@ public class GatewayInfo implements Parcelable {
@Override
public void writeToParcel(Parcel destination, int flags) {
destination.writeString(mGatewayProviderPackageName);
- mGatewayAddress.writeToParcel(destination, 0);
- mOriginalAddress.writeToParcel(destination, 0);
+ Uri.writeToParcel(destination, mGatewayAddress);
+ Uri.writeToParcel(destination, mOriginalAddress);
}
}
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);