summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-03-06 07:32:24 +0100
committerGitHub <noreply@github.com>2024-03-06 07:32:24 +0100
commit5e8960f4bcf1bfa98f1fe8adc824cbf6a5a5fbc4 (patch)
treee022bc5b893778f61fed271d31f4d55146478a72 /app/src/main
parent40da13e014a5b0c6e31b0234e31dac8c55473262 (diff)
parentcae848b5050ef2b7acd5c000e8def62f189b3632 (diff)
downloadAntennaPod-5e8960f4bcf1bfa98f1fe8adc824cbf6a5a5fbc4.zip
Merge pull request #6955 from ByteHamster/checkstyle
Move some Checkstyle rules from new-code file to main file
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java7
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/preferences/DownloadsPreferencesFragment.java16
-rw-r--r--app/src/main/java/de/danoeh/antennapod/receiver/PowerConnectionReceiver.java4
-rw-r--r--app/src/main/java/de/danoeh/antennapod/view/LocalDeleteModal.java10
4 files changed, 19 insertions, 18 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..34aaaa39b 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java
@@ -241,8 +241,9 @@ public class MainActivity extends CastEnabledActivity {
outState.putInt(KEY_GENERATED_VIEW_ID, View.generateViewId());
}
- private final BottomSheetBehavior.BottomSheetCallback bottomSheetCallback =
- new BottomSheetBehavior.BottomSheetCallback() {
+ private final BottomSheetBehavior.BottomSheetCallback bottomSheetCallback = new AntennaPodBottomSheetCallback();
+
+ private class AntennaPodBottomSheetCallback extends BottomSheetBehavior.BottomSheetCallback {
@Override
public void onStateChanged(@NonNull View view, int state) {
if (state == BottomSheetBehavior.STATE_COLLAPSED) {
@@ -266,7 +267,7 @@ public class MainActivity extends CastEnabledActivity {
audioPlayer.fadePlayerToToolbar(slideOffset);
}
- };
+ }
public void setupToolbarToggle(@NonNull MaterialToolbar toolbar, boolean displayUpArrow) {
if (drawerLayout != null) { // Tablet layout does not have a drawer
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/DownloadsPreferencesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/DownloadsPreferencesFragment.java
index c17066fef..91ffa1c4f 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/DownloadsPreferencesFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/DownloadsPreferencesFragment.java
@@ -96,13 +96,13 @@ public class DownloadsPreferencesFragment extends PreferenceFragmentCompat
private void showAutoDeleteEnableDialog() {
new MaterialAlertDialogBuilder(requireContext())
- .setMessage(R.string.pref_auto_local_delete_dialog_body)
- .setPositiveButton(R.string.yes, (dialog, which) -> {
- blockAutoDeleteLocal = false;
- ((TwoStatePreference) findPreference(PREF_AUTO_DELETE_LOCAL)).setChecked(true);
- blockAutoDeleteLocal = true;
- })
- .setNegativeButton(R.string.cancel_label, null)
- .show();
+ .setMessage(R.string.pref_auto_local_delete_dialog_body)
+ .setPositiveButton(R.string.yes, (dialog, which) -> {
+ blockAutoDeleteLocal = false;
+ ((TwoStatePreference) findPreference(PREF_AUTO_DELETE_LOCAL)).setChecked(true);
+ blockAutoDeleteLocal = true;
+ })
+ .setNegativeButton(R.string.cancel_label, null)
+ .show();
}
}
diff --git a/app/src/main/java/de/danoeh/antennapod/receiver/PowerConnectionReceiver.java b/app/src/main/java/de/danoeh/antennapod/receiver/PowerConnectionReceiver.java
index 53b7f963a..a90ad157e 100644
--- a/app/src/main/java/de/danoeh/antennapod/receiver/PowerConnectionReceiver.java
+++ b/app/src/main/java/de/danoeh/antennapod/receiver/PowerConnectionReceiver.java
@@ -16,9 +16,9 @@ import de.danoeh.antennapod.core.storage.DBTasks;
// Since the intent doesn't have the EXTRA_STATUS like the android.com article says it does
// (though it used to)
public class PowerConnectionReceiver extends BroadcastReceiver {
- private static final String TAG = "PowerConnectionReceiver";
+ private static final String TAG = "PowerConnectionReceiver";
- @Override
+ @Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
diff --git a/app/src/main/java/de/danoeh/antennapod/view/LocalDeleteModal.java b/app/src/main/java/de/danoeh/antennapod/view/LocalDeleteModal.java
index 4241cadca..a3f541e06 100644
--- a/app/src/main/java/de/danoeh/antennapod/view/LocalDeleteModal.java
+++ b/app/src/main/java/de/danoeh/antennapod/view/LocalDeleteModal.java
@@ -23,10 +23,10 @@ public class LocalDeleteModal {
}
new MaterialAlertDialogBuilder(context)
- .setTitle(R.string.delete_episode_label)
- .setMessage(R.string.delete_local_feed_warning_body)
- .setPositiveButton(R.string.delete_label, (dialog, which) -> deleteCommand.run())
- .setNegativeButton(R.string.cancel_label, null)
- .show();
+ .setTitle(R.string.delete_episode_label)
+ .setMessage(R.string.delete_local_feed_warning_body)
+ .setPositiveButton(R.string.delete_label, (dialog, which) -> deleteCommand.run())
+ .setNegativeButton(R.string.cancel_label, null)
+ .show();
}
}