Code style
This commit is contained in:
parent
bb4b4655d2
commit
02bf71551b
|
@ -146,7 +146,7 @@ public class AboutActivity extends AppCompatActivity {
|
|||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
if (webViewContainer != null && webView != null) {
|
||||
|
|
|
@ -107,7 +107,7 @@ public class FeedInfoActivity extends AppCompatActivity {
|
|||
|
||||
disposable = Maybe.create((MaybeOnSubscribe<Feed>) emitter -> {
|
||||
Feed feed = DBReader.getFeed(feedId);
|
||||
if(feed != null) {
|
||||
if (feed != null) {
|
||||
emitter.onSuccess(feed);
|
||||
} else {
|
||||
emitter.onComplete();
|
||||
|
@ -180,7 +180,7 @@ public class FeedInfoActivity extends AppCompatActivity {
|
|||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ public class FeedSettingsActivity extends AppCompatActivity {
|
|||
|
||||
disposable = Maybe.create((MaybeOnSubscribe<Feed>) emitter -> {
|
||||
Feed feed = DBReader.getFeed(feedId);
|
||||
if(feed != null) {
|
||||
if (feed != null) {
|
||||
emitter.onSuccess(feed);
|
||||
} else {
|
||||
emitter.onComplete();
|
||||
|
@ -287,7 +287,7 @@ public class FeedSettingsActivity extends AppCompatActivity {
|
|||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -491,7 +491,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi
|
|||
super.onStop();
|
||||
EventDistributor.getInstance().unregister(contentUpdate);
|
||||
EventBus.getDefault().unregister(this);
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
if(pd != null) {
|
||||
|
|
|
@ -290,7 +290,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
|
|||
controller.release();
|
||||
controller = null; // prevent leak
|
||||
}
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
super.onStop();
|
||||
|
@ -952,7 +952,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
|
|||
if (feedItem == null) {
|
||||
return;
|
||||
}
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
disposable = Observable.fromCallable(() -> DBReader.getFeedItem(feedItem.getId()))
|
||||
|
|
|
@ -127,7 +127,7 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem
|
|||
if(pagerAdapter != null) {
|
||||
pagerAdapter.setController(null);
|
||||
}
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
EventDistributor.getInstance().unregister(contentUpdate);
|
||||
|
|
|
@ -229,7 +229,7 @@ public class ProxyDialog {
|
|||
}
|
||||
|
||||
private void test() {
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
if(!checkValidity()) {
|
||||
|
|
|
@ -125,7 +125,7 @@ public class AllEpisodesFragment extends Fragment {
|
|||
public void onStop() {
|
||||
super.onStop();
|
||||
EventDistributor.getInstance().unregister(contentUpdate);
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ public class AllEpisodesFragment extends Fragment {
|
|||
}
|
||||
|
||||
void loadItems() {
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
if (viewsCreated && !itemsLoaded) {
|
||||
|
|
|
@ -61,7 +61,7 @@ public class CompletedDownloadsFragment extends ListFragment {
|
|||
public void onStop() {
|
||||
super.onStop();
|
||||
EventDistributor.getInstance().unregister(contentUpdate);
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public class CompletedDownloadsFragment extends ListFragment {
|
|||
@Override
|
||||
public void onDetach() {
|
||||
super.onDetach();
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ public class CompletedDownloadsFragment extends ListFragment {
|
|||
super.onDestroyView();
|
||||
listAdapter = null;
|
||||
viewCreated = false;
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ public class CompletedDownloadsFragment extends ListFragment {
|
|||
};
|
||||
|
||||
private void loadItems() {
|
||||
if(disposable != null) {
|
||||
if (disposable != null) {
|
||||
disposable.dispose();
|
||||
}
|
||||
if (items == null && viewCreated) {
|
||||
|
|
|
@ -186,7 +186,7 @@ public class ExternalPlayerFragment extends Fragment {
|
|||
}
|
||||
disposable = Maybe.create(emitter -> {
|
||||
Playable media = controller.getMedia();
|
||||
if(media != null) {
|
||||
if (media != null) {
|
||||
emitter.onSuccess(media);
|
||||
} else {
|
||||
emitter.onComplete();
|
||||
|
|
|
@ -113,7 +113,6 @@ public class UserPreferences {
|
|||
private static final String PREF_RIGHT_VOLUME = "prefRightVolume";
|
||||
|
||||
// Experimental
|
||||
public static final String PREF_SONIC = "prefSonic";
|
||||
private static final String PREF_STEREO_TO_MONO = "PrefStereoToMono";
|
||||
public static final String PREF_CAST_ENABLED = "prefCast"; //Used for enabling Chromecast support
|
||||
public static final int EPISODE_CLEANUP_QUEUE = -1;
|
||||
|
|
|
@ -2,4 +2,4 @@ package de.danoeh.antennapod.core.util;
|
|||
|
||||
public interface Consumer<T> {
|
||||
void accept(T t);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -781,7 +781,7 @@ public abstract class PlaybackController {
|
|||
private void initServiceNotRunning() {
|
||||
mediaLoader = Maybe.create((MaybeOnSubscribe<Playable>) emitter -> {
|
||||
Playable media = getMedia();
|
||||
if(media != null) {
|
||||
if (media != null) {
|
||||
emitter.onSuccess(media);
|
||||
} else {
|
||||
emitter.onComplete();
|
||||
|
|
Loading…
Reference in New Issue