Browse Source

Remove redundant suppressions

pull/559/head
TacoTheDank 4 years ago
parent
commit
f3206a171b
  1. 1
      app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java
  2. 1
      app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java
  3. 2
      app/src/main/java/org/transdroid/core/gui/settings/HelpSettingsActivity.java
  4. 1
      app/src/main/java/org/transdroid/core/gui/settings/RssfeedSettingsActivity.java
  5. 1
      app/src/main/java/org/transdroid/core/gui/settings/ServerSettingsActivity.java
  6. 3
      app/src/main/java/org/transdroid/core/gui/settings/SystemSettingsActivity.java
  7. 1
      app/src/main/java/org/transdroid/core/gui/settings/WebsearchSettingsActivity.java
  8. 2
      app/src/main/java/org/transdroid/core/rssparser/RssParser.java
  9. 1
      app/src/main/java/org/transdroid/core/service/AppUpdateJobRunner.java
  10. 1
      app/src/main/java/org/transdroid/core/widget/ListWidgetProvider.java

1
app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java

@ -1311,7 +1311,6 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE
@UiThread @UiThread
protected void onCommunicationError(DaemonTaskFailureResult result, boolean isCritical) { protected void onCommunicationError(DaemonTaskFailureResult result, boolean isCritical) {
//noinspection ThrowableResultOfMethodCallIgnored
log.i(this, result.getException().toString()); log.i(this, result.getException().toString());
String error = getString(LocalTorrent.getResourceForDaemonException(result.getException())); String error = getString(LocalTorrent.getResourceForDaemonException(result.getException()));
SnackbarManager.show(Snackbar.with(this).text(error).colorResource(R.color.red).type(SnackbarType.MULTI_LINE)); SnackbarManager.show(Snackbar.with(this).text(error).colorResource(R.color.red).type(SnackbarType.MULTI_LINE));

1
app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java

@ -321,7 +321,6 @@ public class RssFeedsActivity extends AppCompatActivity {
@UiThread @UiThread
protected void onCommunicationError(DaemonException daemonException) { protected void onCommunicationError(DaemonException daemonException) {
//noinspection ThrowableResultOfMethodCallIgnored
log.i(this, daemonException.toString()); log.i(this, daemonException.toString());
String error = getString(LocalTorrent.getResourceForDaemonException(daemonException)); String error = getString(LocalTorrent.getResourceForDaemonException(daemonException));
SnackbarManager.show(Snackbar.with(this).text(error).colorResource(R.color.red).type(SnackbarType.MULTI_LINE)); SnackbarManager.show(Snackbar.with(this).text(error).colorResource(R.color.red).type(SnackbarType.MULTI_LINE));

2
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() { private OnPreferenceClickListener onChangeLogClick = new OnPreferenceClickListener() {
@SuppressWarnings("deprecation")
@Override @Override
public boolean onPreferenceClick(Preference preference) { public boolean onPreferenceClick(Preference preference) {
showDialog(DIALOG_CHANGELOG); showDialog(DIALOG_CHANGELOG);
@ -74,7 +73,6 @@ public class HelpSettingsActivity extends PreferenceCompatActivity {
} }
}; };
private OnPreferenceClickListener onAboutClick = new OnPreferenceClickListener() { private OnPreferenceClickListener onAboutClick = new OnPreferenceClickListener() {
@SuppressWarnings("deprecation")
@Override @Override
public boolean onPreferenceClick(Preference preference) { public boolean onPreferenceClick(Preference preference) {
showDialog(DIALOG_ABOUT); showDialog(DIALOG_ABOUT);

1
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(); MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();
} }
@SuppressWarnings("deprecation")
@OptionsItem(R.id.action_removesettings) @OptionsItem(R.id.action_removesettings)
protected void removeSettings() { protected void removeSettings() {
showDialog(DIALOG_CONFIRMREMOVE); showDialog(DIALOG_CONFIRMREMOVE);

1
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(); MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();
} }
@SuppressWarnings("deprecation")
@OptionsItem(R.id.action_removesettings) @OptionsItem(R.id.action_removesettings)
protected void removeSettings() { protected void removeSettings() {
showDialog(DIALOG_CONFIRMREMOVE); showDialog(DIALOG_CONFIRMREMOVE);

3
app/src/main/java/org/transdroid/core/gui/settings/SystemSettingsActivity.java

@ -70,7 +70,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity {
@Bean @Bean
protected SettingsPersistence settingsPersistence; protected SettingsPersistence settingsPersistence;
private OnPreferenceClickListener onImportSettingsClick = new OnPreferenceClickListener() { private OnPreferenceClickListener onImportSettingsClick = new OnPreferenceClickListener() {
@SuppressWarnings("deprecation")
@Override @Override
public boolean onPreferenceClick(Preference preference) { public boolean onPreferenceClick(Preference preference) {
showDialog(DIALOG_IMPORTSETTINGS); showDialog(DIALOG_IMPORTSETTINGS);
@ -78,7 +77,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity {
} }
}; };
private OnPreferenceClickListener onExportSettingsClick = new OnPreferenceClickListener() { private OnPreferenceClickListener onExportSettingsClick = new OnPreferenceClickListener() {
@SuppressWarnings("deprecation")
@Override @Override
public boolean onPreferenceClick(Preference preference) { public boolean onPreferenceClick(Preference preference) {
showDialog(DIALOG_EXPORTSETTINGS); showDialog(DIALOG_EXPORTSETTINGS);
@ -268,7 +266,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity {
} }
} }
@SuppressWarnings("deprecation")
protected Dialog onCreateDialog(int id) { protected Dialog onCreateDialog(int id) {
switch (id) { switch (id) {
case DIALOG_IMPORTSETTINGS: case DIALOG_IMPORTSETTINGS:

1
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(); MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();
} }
@SuppressWarnings("deprecation")
@OptionsItem(R.id.action_removesettings) @OptionsItem(R.id.action_removesettings)
protected void removeSettings() { protected void removeSettings() {
showDialog(DIALOG_CONFIRMREMOVE); showDialog(DIALOG_CONFIRMREMOVE);

2
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.SAXParser;
import javax.xml.parsers.SAXParserFactory; import javax.xml.parsers.SAXParserFactory;
@SuppressWarnings("deprecation")
public class RssParser extends DefaultHandler { public class RssParser extends DefaultHandler {
private final String urlString; private final String urlString;
@ -201,7 +200,6 @@ public class RssParser extends DefaultHandler {
/** /**
* This is where we actually parse for the elements contents * This is where we actually parse for the elements contents
*/ */
@SuppressWarnings("deprecation")
public final void endElement(String uri, String localName, String qName) { public final void endElement(String uri, String localName, String qName) {
/** Check we have an RSS Feed */ /** Check we have an RSS Feed */
if (this.channel == null) { if (this.channel == null) {

1
app/src/main/java/org/transdroid/core/service/AppUpdateJobRunner.java

@ -169,7 +169,6 @@ public class AppUpdateJobRunner {
return appVersion; return appVersion;
} }
@SuppressWarnings("deprecation")
private void newNotification(String ticker, String title, String text, String downloadUrl, int notifyID) { private void newNotification(String ticker, String title, String text, String downloadUrl, int notifyID) {
PendingIntent pi = PendingIntent.getActivity(context, notifyID, PendingIntent pi = PendingIntent.getActivity(context, notifyID,
new Intent(Intent.ACTION_VIEW, Uri.parse(downloadUrl)), PendingIntent.FLAG_UPDATE_CURRENT); new Intent(Intent.ACTION_VIEW, Uri.parse(downloadUrl)), PendingIntent.FLAG_UPDATE_CURRENT);

1
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 * @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 * @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) { public static RemoteViews buildRemoteViews(Context context, int appWidgetId, ListWidgetConfig config) {
// Does the server to show and its widget settings actually still exist? // Does the server to show and its widget settings actually still exist?

Loading…
Cancel
Save