From fec0945be9d55d4a4be9673fe87248dd36115b77 Mon Sep 17 00:00:00 2001 From: M M Arif Date: Tue, 24 Mar 2020 13:33:35 +0500 Subject: [PATCH] Fix encoding on login --- .../main/java/org/mian/gitnex/activities/LoginActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java b/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java index ccea51a6..5136b096 100644 --- a/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java @@ -32,6 +32,7 @@ import org.mian.gitnex.util.AppUtil; import org.mian.gitnex.util.TinyDB; import java.net.URI; import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Objects; import java.util.UUID; @@ -530,7 +531,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener private void letTheUserIn(final String instanceUrl, final String loginUid, final String loginPass, final int loginOTP) { - final String credential = Credentials.basic(loginUid, loginPass, Charset.forName("UTF-8")); + final String credential = Credentials.basic(loginUid, loginPass, StandardCharsets.UTF_8); Call> call; if(loginOTP != 0) {