Skip to content

Commit

Permalink
Let's Android encode given user input
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstyl committed Nov 27, 2022
1 parent 5a27470 commit 7c42bcd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ internal class ContactQueries(
): Flow<List<PartialContact>> {
return contentResolver.runQueryFlow(
contentUri = Contacts.CONTENT_FILTER_URI.buildUpon()
.appendEncodedPath(name)
.appendPath(name)
.build(),
projection = ContactsQuery.projection(displayNameStyle),
sortOrder = ContactsQuery.sortOrder(displayNameStyle),
Expand Down Expand Up @@ -143,7 +143,7 @@ internal class ContactQueries(
): Flow<List<PartialContact>> {
return contentResolver.runQueryFlow(
contentUri = EmailColumns.CONTENT_FILTER_URI.buildUpon()
.appendEncodedPath(mailAddress)
.appendPath(mailAddress)
.build(),
projection = FilterQuery.projection(displayNameStyle),
sortOrder = FilterQuery.sortOrder(displayNameStyle)
Expand All @@ -166,7 +166,7 @@ internal class ContactQueries(
): Flow<List<PartialContact>> {
return contentResolver.runQueryFlow(
contentUri = ContactsContract.PhoneLookup.CONTENT_FILTER_URI.buildUpon()
.appendEncodedPath(phoneNumber)
.appendPath(phoneNumber)
.build(),
projection = arrayOf(
PHONE_LOOKUP_CONTACT_ID,
Expand Down

0 comments on commit 7c42bcd

Please sign in to comment.