From 63287d11d8e38d826f566d0848f3a02024bb8c1c Mon Sep 17 00:00:00 2001 From: Deep Date: Mon, 27 Jul 2020 21:03:53 -0400 Subject: [PATCH] Update encoding related code --- .../org/chromium/chrome/browser/rate/RateFeedbackUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/java/org/chromium/chrome/browser/rate/RateFeedbackUtils.java b/android/java/org/chromium/chrome/browser/rate/RateFeedbackUtils.java index 07d3f7350464..1c2cac0a0b43 100644 --- a/android/java/org/chromium/chrome/browser/rate/RateFeedbackUtils.java +++ b/android/java/org/chromium/chrome/browser/rate/RateFeedbackUtils.java @@ -30,7 +30,7 @@ import org.chromium.chrome.browser.ntp_background_images.NTPBackgroundImagesBridge; public class RateFeedbackUtils { - private static final String TAG = "Rate"; + private static final String TAG = "Rate_Brave"; private static final String RATE_URL = "https://laptop-updates.brave.com/1/feedback"; public interface RateFeedbackCallback { @@ -92,7 +92,7 @@ private static void sendRateFeedback(String userSelection, String userFeedback) jsonParam.put("api_key", mNTPBackgroundImagesBridge.getReferralApiKey()); OutputStream outputStream = urlConnection.getOutputStream(); - byte[] input = jsonParam.toString().getBytes(StandardCharsets.UTF_8.toString()); + byte[] input = jsonParam.toString().getBytes(StandardCharsets.UTF_8.name()); outputStream.write(input, 0, input.length); outputStream.flush(); outputStream.close(); @@ -100,7 +100,7 @@ private static void sendRateFeedback(String userSelection, String userFeedback) int HttpResult = urlConnection.getResponseCode(); if (HttpResult == HttpURLConnection.HTTP_OK) { BufferedReader br = new BufferedReader(new InputStreamReader( - urlConnection.getInputStream(), StandardCharsets.UTF_8.toString())); + urlConnection.getInputStream(), StandardCharsets.UTF_8.name())); String line = null; while ((line = br.readLine()) != null) { sb.append(line + "\n");