diff options
author | TacoTheDank <SkytkRSfan3895@gmail.com> | 2024-03-06 02:52:14 -0500 |
---|---|---|
committer | TacoTheDank <SkytkRSfan3895@gmail.com> | 2024-03-06 02:52:14 -0500 |
commit | c2ccc28b9513dab91e006681fd0c8fafac275623 (patch) | |
tree | 92fb4736066544322a08481fcd5d5db74b642ca6 /app/src/main/java/de/danoeh | |
parent | 6f582e4c52ae5f6f31b2014110823f561f5eb34b (diff) | |
download | AntennaPod-c2ccc28b9513dab91e006681fd0c8fafac275623.zip |
Update SpotBugs
Diffstat (limited to 'app/src/main/java/de/danoeh')
3 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index 1baa90d28..369489bf8 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -290,7 +290,7 @@ public class MainActivity extends CastEnabledActivity { @Override protected void onDestroy() { super.onDestroy(); - if (drawerLayout != null) { + if (drawerLayout != null && drawerToggle != null) { drawerLayout.removeDrawerListener(drawerToggle); } } diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/TimeRangeDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/TimeRangeDialog.java index 85913043e..1d84c7c22 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/TimeRangeDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/TimeRangeDialog.java @@ -139,8 +139,8 @@ public class TimeRangeDialog extends MaterialAlertDialogBuilder { } protected Point radToPoint(float angle, float radius) { - return new Point((int) (getWidth() / 2 + radius * Math.sin(-angle * Math.PI / 180 + Math.PI)), - (int) (getHeight() / 2 + radius * Math.cos(-angle * Math.PI / 180 + Math.PI))); + return new Point((int) (getWidth() / 2.0 + radius * Math.sin(-angle * Math.PI / 180.0 + Math.PI)), + (int) (getHeight() / 2.0 + radius * Math.cos(-angle * Math.PI / 180.0 + Math.PI))); } @Override diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java index 291de2a50..34712d428 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java @@ -86,9 +86,9 @@ public class DownloadLogFragment extends BottomSheetDialogFragment @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { - Object item = adapter.getItem(position); - if (item instanceof DownloadResult) { - new DownloadLogDetailsDialog(getContext(), (DownloadResult) item).show(); + final DownloadResult item = adapter.getItem(position); + if (item != null) { + new DownloadLogDetailsDialog(getContext(), item).show(); } } |