Skip to content

Commit

Permalink
Merge pull request #1315 from nextcloud/fixLint
Browse files Browse the repository at this point in the history
Fix lint for URLEncoder.encode which requires API 33
  • Loading branch information
David-Development authored Nov 1, 2023
2 parents 6050667 + 7040243 commit 77c202a
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,13 @@ private void openBugReport() {
}
}

body = URLEncoder.encode(debugInfo, StandardCharsets.UTF_8);
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/nextcloud/news-android/issues/new?title=" + title + "&body=" + body));
startActivity(browserIntent);
try {
body = URLEncoder.encode(debugInfo, StandardCharsets.UTF_8.toString());
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/nextcloud/news-android/issues/new?title=" + title + "&body=" + body));
startActivity(browserIntent);
} catch (UnsupportedEncodingException e) {
// Should never happen for UTF8 on android
}
}


Expand Down

0 comments on commit 77c202a

Please sign in to comment.