Skip to content

Conversation

Unpublished
Copy link
Collaborator

Fixes following lint error:

  /home/runner/actions-runner/_work/news-android/news-android/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsFragment.java:380: Error: Call requires API level 33 (current min is 21): java.net.URLEncoder#encode [NewApi]
          body = URLEncoder.encode(debugInfo, StandardCharsets.UTF_8);
                            ~~~~~~

Ironically opening a bug report would result in a crash on API version lower than 33.

Introduced with 098fb15

Signed-off-by: Unpublished <unpublished@gmx.net>
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about a Log.wtf() call? 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants