diff options
author | Walter Jang <wjang@google.com> | 2015-08-06 16:10:03 -0700 |
---|---|---|
committer | Walter Jang <wjang@google.com> | 2015-08-10 11:33:22 -0700 |
commit | d37af1cf3a97904579b347bafdf63c0c629a54fd (patch) | |
tree | 7bac0e9f01ff631cd3d528ba177b0d71c22a5ff6 /src/com/android/contacts/activities/PeopleActivity.java | |
parent | 615ed9c5e89f06a56ed6ad30244a9f6cb495e85c (diff) | |
download | android_packages_apps_Contacts-d37af1cf3a97904579b347bafdf63c0c629a54fd.tar.gz android_packages_apps_Contacts-d37af1cf3a97904579b347bafdf63c0c629a54fd.tar.bz2 android_packages_apps_Contacts-d37af1cf3a97904579b347bafdf63c0c629a54fd.zip |
Encode read-only lookupKeys twice so multi vcard URI can split on :
With this change, a multi vcard share of a read-only contact and a
writeable contact with the following unencoded lookup Uris:
read-only: 2234ig:111432238085115413361
writeable: 341i2dab67978f1e8bda
will look like: content://com.android.contacts/contacts/as_multi_vcard/
2234ig%253A111432238085115413361%3A341i2dab67978f1e8bda
So the ':' in the read-only lookupKey will be encoded twice going from
':' => '%3A' => '%253A'
In CP2, the lookupKeys will be decoded when fetched as path segments to
2234ig%3A111432238085115413361:341i2dab67978f1e8bda, which will then
split properly on ':'.
Bug 22940695
Change-Id: Ie557f1573b1c3a8a5ada1bf5199c1e887c2c9f5a
Diffstat (limited to 'src/com/android/contacts/activities/PeopleActivity.java')
-rw-r--r-- | src/com/android/contacts/activities/PeopleActivity.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java index 1591866d3..97c6ea028 100644 --- a/src/com/android/contacts/activities/PeopleActivity.java +++ b/src/com/android/contacts/activities/PeopleActivity.java @@ -1246,7 +1246,7 @@ public class PeopleActivity extends ContactsActivity implements final Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); final Uri lookupUri = Contacts.getLookupUri(getContentResolver(), contactUri); List<String> pathSegments = lookupUri.getPathSegments(); - uriListBuilder.append(pathSegments.get(pathSegments.size() - 2)); + uriListBuilder.append(Uri.encode(pathSegments.get(pathSegments.size() - 2))); firstIteration = false; } final Uri uri = Uri.withAppendedPath( |