From f3206a171b55bdf78490d7a1b5c45a30e5e678be Mon Sep 17 00:00:00 2001 From: TacoTheDank Date: Fri, 10 Jul 2020 17:52:29 -0400 Subject: [PATCH] Remove redundant suppressions --- .../main/java/org/transdroid/core/gui/TorrentsActivity.java | 1 - .../java/org/transdroid/core/gui/rss/RssFeedsActivity.java | 1 - .../org/transdroid/core/gui/settings/HelpSettingsActivity.java | 2 -- .../transdroid/core/gui/settings/RssfeedSettingsActivity.java | 1 - .../transdroid/core/gui/settings/ServerSettingsActivity.java | 1 - .../transdroid/core/gui/settings/SystemSettingsActivity.java | 3 --- .../core/gui/settings/WebsearchSettingsActivity.java | 1 - app/src/main/java/org/transdroid/core/rssparser/RssParser.java | 2 -- .../java/org/transdroid/core/service/AppUpdateJobRunner.java | 1 - .../java/org/transdroid/core/widget/ListWidgetProvider.java | 1 - 10 files changed, 14 deletions(-) diff --git a/app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java b/app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java index efd1ded9..791c626c 100644 --- a/app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java +++ b/app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java @@ -1311,7 +1311,6 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE @UiThread protected void onCommunicationError(DaemonTaskFailureResult result, boolean isCritical) { - //noinspection ThrowableResultOfMethodCallIgnored log.i(this, result.getException().toString()); String error = getString(LocalTorrent.getResourceForDaemonException(result.getException())); SnackbarManager.show(Snackbar.with(this).text(error).colorResource(R.color.red).type(SnackbarType.MULTI_LINE)); diff --git a/app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java b/app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java index 76253479..4dc23707 100644 --- a/app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java +++ b/app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java @@ -321,7 +321,6 @@ public class RssFeedsActivity extends AppCompatActivity { @UiThread protected void onCommunicationError(DaemonException daemonException) { - //noinspection ThrowableResultOfMethodCallIgnored log.i(this, daemonException.toString()); String error = getString(LocalTorrent.getResourceForDaemonException(daemonException)); SnackbarManager.show(Snackbar.with(this).text(error).colorResource(R.color.red).type(SnackbarType.MULTI_LINE)); diff --git a/app/src/main/java/org/transdroid/core/gui/settings/HelpSettingsActivity.java b/app/src/main/java/org/transdroid/core/gui/settings/HelpSettingsActivity.java index de617776..3013e02d 100644 --- a/app/src/main/java/org/transdroid/core/gui/settings/HelpSettingsActivity.java +++ b/app/src/main/java/org/transdroid/core/gui/settings/HelpSettingsActivity.java @@ -66,7 +66,6 @@ public class HelpSettingsActivity extends PreferenceCompatActivity { } }; private OnPreferenceClickListener onChangeLogClick = new OnPreferenceClickListener() { - @SuppressWarnings("deprecation") @Override public boolean onPreferenceClick(Preference preference) { showDialog(DIALOG_CHANGELOG); @@ -74,7 +73,6 @@ public class HelpSettingsActivity extends PreferenceCompatActivity { } }; private OnPreferenceClickListener onAboutClick = new OnPreferenceClickListener() { - @SuppressWarnings("deprecation") @Override public boolean onPreferenceClick(Preference preference) { showDialog(DIALOG_ABOUT); diff --git a/app/src/main/java/org/transdroid/core/gui/settings/RssfeedSettingsActivity.java b/app/src/main/java/org/transdroid/core/gui/settings/RssfeedSettingsActivity.java index 7bb17c0e..a9db25ca 100644 --- a/app/src/main/java/org/transdroid/core/gui/settings/RssfeedSettingsActivity.java +++ b/app/src/main/java/org/transdroid/core/gui/settings/RssfeedSettingsActivity.java @@ -67,7 +67,6 @@ public class RssfeedSettingsActivity extends KeyBoundPreferencesActivity { MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start(); } - @SuppressWarnings("deprecation") @OptionsItem(R.id.action_removesettings) protected void removeSettings() { showDialog(DIALOG_CONFIRMREMOVE); diff --git a/app/src/main/java/org/transdroid/core/gui/settings/ServerSettingsActivity.java b/app/src/main/java/org/transdroid/core/gui/settings/ServerSettingsActivity.java index 86467619..fa4cf585 100644 --- a/app/src/main/java/org/transdroid/core/gui/settings/ServerSettingsActivity.java +++ b/app/src/main/java/org/transdroid/core/gui/settings/ServerSettingsActivity.java @@ -107,7 +107,6 @@ public class ServerSettingsActivity extends KeyBoundPreferencesActivity { MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start(); } - @SuppressWarnings("deprecation") @OptionsItem(R.id.action_removesettings) protected void removeSettings() { showDialog(DIALOG_CONFIRMREMOVE); diff --git a/app/src/main/java/org/transdroid/core/gui/settings/SystemSettingsActivity.java b/app/src/main/java/org/transdroid/core/gui/settings/SystemSettingsActivity.java index 74c39d0b..b1109021 100644 --- a/app/src/main/java/org/transdroid/core/gui/settings/SystemSettingsActivity.java +++ b/app/src/main/java/org/transdroid/core/gui/settings/SystemSettingsActivity.java @@ -70,7 +70,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity { @Bean protected SettingsPersistence settingsPersistence; private OnPreferenceClickListener onImportSettingsClick = new OnPreferenceClickListener() { - @SuppressWarnings("deprecation") @Override public boolean onPreferenceClick(Preference preference) { showDialog(DIALOG_IMPORTSETTINGS); @@ -78,7 +77,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity { } }; private OnPreferenceClickListener onExportSettingsClick = new OnPreferenceClickListener() { - @SuppressWarnings("deprecation") @Override public boolean onPreferenceClick(Preference preference) { showDialog(DIALOG_EXPORTSETTINGS); @@ -268,7 +266,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity { } } - @SuppressWarnings("deprecation") protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_IMPORTSETTINGS: diff --git a/app/src/main/java/org/transdroid/core/gui/settings/WebsearchSettingsActivity.java b/app/src/main/java/org/transdroid/core/gui/settings/WebsearchSettingsActivity.java index dbbff312..923042bb 100644 --- a/app/src/main/java/org/transdroid/core/gui/settings/WebsearchSettingsActivity.java +++ b/app/src/main/java/org/transdroid/core/gui/settings/WebsearchSettingsActivity.java @@ -63,7 +63,6 @@ public class WebsearchSettingsActivity extends KeyBoundPreferencesActivity { MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start(); } - @SuppressWarnings("deprecation") @OptionsItem(R.id.action_removesettings) protected void removeSettings() { showDialog(DIALOG_CONFIRMREMOVE); diff --git a/app/src/main/java/org/transdroid/core/rssparser/RssParser.java b/app/src/main/java/org/transdroid/core/rssparser/RssParser.java index 2cfb1677..96093917 100644 --- a/app/src/main/java/org/transdroid/core/rssparser/RssParser.java +++ b/app/src/main/java/org/transdroid/core/rssparser/RssParser.java @@ -32,7 +32,6 @@ import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; -@SuppressWarnings("deprecation") public class RssParser extends DefaultHandler { private final String urlString; @@ -201,7 +200,6 @@ public class RssParser extends DefaultHandler { /** * This is where we actually parse for the elements contents */ - @SuppressWarnings("deprecation") public final void endElement(String uri, String localName, String qName) { /** Check we have an RSS Feed */ if (this.channel == null) { diff --git a/app/src/main/java/org/transdroid/core/service/AppUpdateJobRunner.java b/app/src/main/java/org/transdroid/core/service/AppUpdateJobRunner.java index fe368e5c..b7662f54 100644 --- a/app/src/main/java/org/transdroid/core/service/AppUpdateJobRunner.java +++ b/app/src/main/java/org/transdroid/core/service/AppUpdateJobRunner.java @@ -169,7 +169,6 @@ public class AppUpdateJobRunner { return appVersion; } - @SuppressWarnings("deprecation") private void newNotification(String ticker, String title, String text, String downloadUrl, int notifyID) { PendingIntent pi = PendingIntent.getActivity(context, notifyID, new Intent(Intent.ACTION_VIEW, Uri.parse(downloadUrl)), PendingIntent.FLAG_UPDATE_CURRENT); diff --git a/app/src/main/java/org/transdroid/core/widget/ListWidgetProvider.java b/app/src/main/java/org/transdroid/core/widget/ListWidgetProvider.java index 9d773417..d5b06100 100644 --- a/app/src/main/java/org/transdroid/core/widget/ListWidgetProvider.java +++ b/app/src/main/java/org/transdroid/core/widget/ListWidgetProvider.java @@ -66,7 +66,6 @@ public class ListWidgetProvider extends AppWidgetProvider { * @param config The user widget configuration, with filter and theme preferences * @return A fully initialised set of remote views to update the widget with the AppWidgetManager */ - @SuppressWarnings("deprecation") public static RemoteViews buildRemoteViews(Context context, int appWidgetId, ListWidgetConfig config) { // Does the server to show and its widget settings actually still exist?