From 31861ca285d721f9170077e8486ddb298e9aa426 Mon Sep 17 00:00:00 2001 From: Soso Tughushi Date: Wed, 29 Jun 2016 19:56:39 +0400 Subject: [PATCH] Fixed rule 'Lamdbas containing only one statement should not nest this statement in a block' --- .../test/antennapod/ui/PlaybackSonicTest.java | 8 ++++---- .../de/test/antennapod/ui/PlaybackTest.java | 7 +++---- .../antennapod/activity/AboutActivity.java | 11 +++++------ .../activity/DirectoryChooserActivity.java | 8 ++------ .../antennapod/activity/MainActivity.java | 12 +++--------- .../activity/MediaplayerActivity.java | 13 +++---------- .../activity/MediaplayerInfoActivity.java | 8 ++------ .../activity/OnlineFeedViewActivity.java | 4 +--- .../activity/StatisticsActivity.java | 4 +--- .../antennapod/asynctask/OpmlImportWorker.java | 4 +--- .../dialog/GpodnetSetHostnameDialog.java | 4 +--- .../antennapod/dialog/VariableSpeedDialog.java | 4 +--- .../fragment/AllEpisodesFragment.java | 4 +--- .../fragment/CompletedDownloadsFragment.java | 4 +--- .../fragment/DownloadLogFragment.java | 4 +--- .../fragment/FavoriteEpisodesFragment.java | 4 +--- .../fragment/ItemDescriptionFragment.java | 8 ++------ .../antennapod/fragment/ItemFragment.java | 4 +--- .../antennapod/fragment/ItemlistFragment.java | 4 +--- .../fragment/PlaybackHistoryFragment.java | 4 +--- .../antennapod/fragment/QueueFragment.java | 4 +--- .../antennapod/fragment/SearchFragment.java | 4 +--- .../fragment/SubscriptionFragment.java | 18 +++++------------- .../core/util/playback/PlaybackController.java | 4 +--- 24 files changed, 44 insertions(+), 109 deletions(-) diff --git a/app/src/androidTest/java/de/test/antennapod/ui/PlaybackSonicTest.java b/app/src/androidTest/java/de/test/antennapod/ui/PlaybackSonicTest.java index d4994fb1a..bfbeedd83 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/PlaybackSonicTest.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/PlaybackSonicTest.java @@ -245,10 +245,10 @@ public class PlaybackSonicTest extends ActivityInstrumentationTestCase2 { - return uiTestUtils.getCurrentMedia(getActivity()) == null - || uiTestUtils.getCurrentMedia(getActivity()).getId() != mediaId; - }, Timeout.getLargeTimeout()); + boolean stoppedPlaying = solo.waitForCondition(() -> + uiTestUtils.getCurrentMedia(getActivity()) == null + || uiTestUtils.getCurrentMedia(getActivity()).getId() != mediaId + , Timeout.getLargeTimeout()); assertTrue(stoppedPlaying); startLocalPlayback(); diff --git a/app/src/androidTest/java/de/test/antennapod/ui/PlaybackTest.java b/app/src/androidTest/java/de/test/antennapod/ui/PlaybackTest.java index 5ce495f9a..661c2200b 100644 --- a/app/src/androidTest/java/de/test/antennapod/ui/PlaybackTest.java +++ b/app/src/androidTest/java/de/test/antennapod/ui/PlaybackTest.java @@ -236,10 +236,9 @@ public class PlaybackTest extends ActivityInstrumentationTestCase2 }, Timeout.getSmallTimeout()); assertTrue(startedPlaying); - boolean stoppedPlaying = solo.waitForCondition(() -> { - return uiTestUtils.getCurrentMedia(getActivity()) == null - || uiTestUtils.getCurrentMedia(getActivity()).getId() != mediaId; - }, Timeout.getLargeTimeout()); + boolean stoppedPlaying = solo.waitForCondition(() -> + uiTestUtils.getCurrentMedia(getActivity()) == null + || uiTestUtils.getCurrentMedia(getActivity()).getId() != mediaId, Timeout.getLargeTimeout()); assertTrue(stoppedPlaying); startLocalPlayback(); diff --git a/app/src/main/java/de/danoeh/antennapod/activity/AboutActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/AboutActivity.java index eef2fa4da..1b42b274c 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/AboutActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/AboutActivity.java @@ -124,12 +124,11 @@ public class AboutActivity extends AppCompatActivity { }) .subscribeOn(Schedulers.newThread()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(webviewData -> { - webview.loadDataWithBaseURL("file:///android_asset/", webviewData, "text/html", - "utf-8", "about:blank"); - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + .subscribe( + webviewData -> + webview.loadDataWithBaseURL("file:///android_asset/", webviewData, "text/html", "utf-8", "about:blank"), + error -> Log.e(TAG, Log.getStackTraceString(error)) + ); } @Override diff --git a/app/src/main/java/de/danoeh/antennapod/activity/DirectoryChooserActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/DirectoryChooserActivity.java index 5fd69ef6a..390d4cef8 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/DirectoryChooserActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/DirectoryChooserActivity.java @@ -89,9 +89,7 @@ public class DirectoryChooserActivity extends AppCompatActivity { adb.setTitle(R.string.folder_not_empty_dialog_title); adb.setMessage(R.string.folder_not_empty_dialog_msg); adb.setNegativeButton(R.string.cancel_label, - (dialog, which) -> { - dialog.dismiss(); - }); + (dialog, which) -> dialog.dismiss()); adb.setPositiveButton(R.string.confirm_label, (dialog, which) -> { dialog.dismiss(); @@ -291,9 +289,7 @@ public class DirectoryChooserActivity extends AppCompatActivity { builder.setMessage(String.format(getString(R.string.create_folder_msg), CREATE_DIRECTORY_NAME)); builder.setNegativeButton(R.string.cancel_label, - (dialog, which) -> { - dialog.dismiss(); - }); + (dialog, which) -> dialog.dismiss()); builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> { dialog.dismiss(); 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 447edc567..97732786e 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -149,9 +149,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi final FragmentManager fm = getSupportFragmentManager(); - fm.addOnBackStackChangedListener(() -> { - drawerToggle.setDrawerIndicatorEnabled(fm.getBackStackEntryCount() == 0); - }); + fm.addOnBackStackChangedListener(() -> drawerToggle.setDrawerIndicatorEnabled(fm.getBackStackEntryCount() == 0)); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); @@ -255,9 +253,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi hiddenDrawerItems.add(NAV_DRAWER_TAGS[which]); } }); - builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> { - UserPreferences.setHiddenDrawerItems(hiddenDrawerItems); - }); + builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> UserPreferences.setHiddenDrawerItems(hiddenDrawerItems)); builder.setNegativeButton(R.string.cancel_label, null); builder.create().show(); } @@ -703,9 +699,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi if (handleIntent) { handleNavIntent(); } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } public void onEvent(QueueEvent event) { diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index ce8672b59..8b565d919 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -725,9 +725,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements AlertDialog.Builder builder = new AlertDialog.Builder(MediaplayerActivity.this); builder.setTitle(R.string.pref_rewind); builder.setSingleChoiceItems(choices, checked, - (dialog, which) -> { - choice = values[which]; - }); + (dialog, which) -> choice = values[which]); builder.setNegativeButton(R.string.cancel_label, null); builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> { UserPreferences.setPrefRewindSecs(choice); @@ -765,9 +763,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements AlertDialog.Builder builder = new AlertDialog.Builder(MediaplayerActivity.this); builder.setTitle(R.string.pref_fast_forward); builder.setSingleChoiceItems(choices, checked, - (dialog, which) -> { - choice = values[which]; - }); + (dialog, which) -> choice = values[which]); builder.setNegativeButton(R.string.cancel_label, null); builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> { UserPreferences.setPrefFastForwardSecs(choice); @@ -868,10 +864,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements isFavorite = isFav; invalidateOptionsMenu(); } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - } - ); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } } } diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java index 647745e39..93dd9db6d 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java @@ -443,9 +443,7 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem hiddenDrawerItems.add(NAV_DRAWER_TAGS[which]); } }); - builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> { - UserPreferences.setHiddenDrawerItems(hiddenDrawerItems); - }); + builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> UserPreferences.setHiddenDrawerItems(hiddenDrawerItems)); builder.setNegativeButton(R.string.cancel_label, null); builder.create().show(); } @@ -461,9 +459,7 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem if (navAdapter != null) { navAdapter.notifyDataSetChanged(); } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java index a53f9bdb8..f393b4cc7 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java @@ -514,9 +514,7 @@ public class OnlineFeedViewActivity extends AppCompatActivity { builder.setMessage(R.string.error_msg_prefix); } builder.setNeutralButton(android.R.string.ok, - (dialog, which) -> { - dialog.cancel(); - } + (dialog, which) -> dialog.cancel() ); builder.setOnCancelListener(dialog -> { setResult(RESULT_ERROR); diff --git a/app/src/main/java/de/danoeh/antennapod/activity/StatisticsActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/StatisticsActivity.java index 0254617e4..9bb8f8856 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/StatisticsActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/StatisticsActivity.java @@ -85,9 +85,7 @@ public class StatisticsActivity extends AppCompatActivity totalTimeTextView.setVisibility(View.VISIBLE); feedStatisticsList.setVisibility(View.VISIBLE); } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } @Override diff --git a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java index 45ec6c5fa..f3b3aeca9 100644 --- a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java +++ b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java @@ -75,9 +75,7 @@ public class OpmlImportWorker extends alert.setTitle(R.string.error_label); alert.setMessage(context.getString(R.string.opml_reader_error) + exception.getMessage()); - alert.setNeutralButton(android.R.string.ok, (dialog, which) -> { - dialog.dismiss(); - }); + alert.setNeutralButton(android.R.string.ok, (dialog, which) -> dialog.dismiss()); alert.create().show(); } } diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java index b50e21d15..db6b48735 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java @@ -32,9 +32,7 @@ public class GpodnetSetHostnameDialog { } dialog1.dismiss(); }) - .setNegativeButton(R.string.cancel_label, (dialog1, which) -> { - dialog1.cancel(); - }) + .setNegativeButton(R.string.cancel_label, (dialog1, which) -> dialog1.cancel()) .setNeutralButton(R.string.pref_gpodnet_sethostname_use_default_host, (dialog1, which) -> { GpodnetPreferences.setHostname(GpodnetService.DEFAULT_BASE_HOST); dialog1.dismiss(); diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java index 2bf9c4e7a..6a975fe49 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java @@ -95,9 +95,7 @@ public class VariableSpeedDialog { AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(R.string.set_playback_speed_label); builder.setMultiChoiceItems(R.array.playback_speed_values, - speedChecked, (dialog, which, isChecked) -> { - speedChecked[which] = isChecked; - }); + speedChecked, (dialog, which, isChecked) -> speedChecked[which] = isChecked); builder.setNegativeButton(android.R.string.cancel, null); builder.setPositiveButton(android.R.string.ok, (dialog, which) -> { diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java index 29db19cf8..76c9affe9 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java @@ -466,9 +466,7 @@ public class AllEpisodesFragment extends Fragment { onFragmentLoaded(); } } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } protected List loadData() { diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/CompletedDownloadsFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/CompletedDownloadsFragment.java index d14265f70..1ba7ed557 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/CompletedDownloadsFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/CompletedDownloadsFragment.java @@ -215,9 +215,7 @@ public class CompletedDownloadsFragment extends ListFragment { onFragmentLoaded(); } } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } } 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 93527b149..0a710196a 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java @@ -165,9 +165,7 @@ public class DownloadLogFragment extends ListFragment { onFragmentLoaded(); } } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java index 65305df3d..234c8377d 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/FavoriteEpisodesFragment.java @@ -71,9 +71,7 @@ public class FavoriteEpisodesFragment extends AllEpisodesFragment { Snackbar snackbar = Snackbar.make(root, getString(R.string.removed_item), Snackbar.LENGTH_LONG); - snackbar.setAction(getString(R.string.undo), v -> { - DBWriter.addFavoriteItem(item); - }); + snackbar.setAction(getString(R.string.undo), v -> DBWriter.addFavoriteItem(item)); snackbar.show(); } } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java index 94d61e075..89a1a8d50 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemDescriptionFragment.java @@ -196,9 +196,7 @@ public class ItemDescriptionFragment extends Fragment implements MediaplayerInfo .subscribe(feedItem -> { shownotesProvider = feedItem; load(); - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } } @@ -311,9 +309,7 @@ public class ItemDescriptionFragment extends Fragment implements MediaplayerInfo webvDescription.loadDataWithBaseURL(null, data, "text/html", "utf-8", "about:blank"); Log.d(TAG, "Webview loaded"); - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } private String loadData() { diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java index baa2a90eb..7939dcb23 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java @@ -580,9 +580,7 @@ public class ItemFragment extends Fragment implements OnSwipeGesture { item = result; itemsLoaded = true; onFragmentLoaded(); - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } private FeedItem loadInBackground() { diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java index 509f8b6de..13f5481e9 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java @@ -627,9 +627,7 @@ public class ItemlistFragment extends ListFragment { onFragmentLoaded(); } } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } private Feed loadData() { diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java index 8d40b23d6..441f0096c 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java @@ -283,9 +283,7 @@ public class PlaybackHistoryFragment extends ListFragment { onFragmentLoaded(); } } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } private List loadData() { diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java index ee9390929..d7f25c134 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/QueueFragment.java @@ -611,9 +611,7 @@ public class QueueFragment extends Fragment { recyclerAdapter.notifyDataSetChanged(); } } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java index 510909379..db57279de 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java @@ -219,9 +219,7 @@ public class SearchFragment extends ListFragment { onFragmentLoaded(); } } - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } private List performSearch() { diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java index 069aed9fd..3ddd5245a 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java @@ -108,9 +108,7 @@ public class SubscriptionFragment extends Fragment { .subscribe(result -> { navDrawerData = result; subscriptionAdapter.notifyDataSetChanged(); - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } @Override @@ -156,21 +154,15 @@ public class SubscriptionFragment extends Fragment { Observable.fromCallable(() -> DBWriter.markFeedSeen(feed.getId())) .subscribeOn(Schedulers.newThread()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(result -> { - loadSubscriptions(); - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + .subscribe(result -> loadSubscriptions(), + error -> Log.e(TAG, Log.getStackTraceString(error))); return true; case R.id.mark_all_read_item: Observable.fromCallable(() -> DBWriter.markFeedRead(feed.getId())) .subscribeOn(Schedulers.newThread()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(result -> { - loadSubscriptions(); - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + .subscribe(result -> loadSubscriptions(), + error -> Log.e(TAG, Log.getStackTraceString(error))); return true; case R.id.remove_item: final FeedRemover remover = new FeedRemover(getContext(), feed) { diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java index c0b417b81..13aadf027 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java @@ -197,9 +197,7 @@ public abstract class PlaybackController { mConnection, 0); } Log.d(TAG, "Result for service binding: " + bound); - }, error -> { - Log.e(TAG, Log.getStackTraceString(error)); - }); + }, error -> Log.e(TAG, Log.getStackTraceString(error))); } /**