Fix potential charset crash on some devices.

This commit is contained in:
Greyson Parrelli 2024-02-23 12:19:59 -05:00
parent 763e891dfd
commit dcd0d433b0

View file

@ -1095,7 +1095,7 @@ public class PushServiceSocket {
*/
public @NonNull ACI getAciByUsernameHash(String usernameHash) throws IOException {
String response = makeServiceRequestWithoutAuthentication(
String.format(GET_USERNAME_PATH, URLEncoder.encode(usernameHash, StandardCharsets.UTF_8.toString())),
String.format(GET_USERNAME_PATH, URLEncoder.encode(usernameHash, StandardCharsets.UTF_8.name())),
"GET",
null,
NO_HEADERS,