mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-10-29 11:49:33 +00:00
Remove and fix suppressions for some active files (#7692)
This commit is contained in:
parent
7c0582c99e
commit
819fd63332
@ -930,6 +930,8 @@ public class MainActivity extends CastEnabledActivity {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (customKeyCode != null) {
|
||||
|
||||
@ -129,7 +129,8 @@ public class ItemFragment extends Fragment {
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
View layout = inflater.inflate(R.layout.feeditem_fragment, container, false);
|
||||
|
||||
|
||||
@ -38,7 +38,8 @@ public class FeedSettingsFragment extends Fragment {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
View root = inflater.inflate(R.layout.feedsettings, container, false);
|
||||
long feedId = getArguments().getLong(EXTRA_FEED_ID);
|
||||
|
||||
|
||||
@ -138,7 +138,7 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
|
||||
if (downloader != null && !downloader.isFinished()) {
|
||||
downloader.cancel();
|
||||
}
|
||||
if(dialog != null && dialog.isShowing()) {
|
||||
if (dialog != null && dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
}
|
||||
@ -146,10 +146,10 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
if(download != null) {
|
||||
if (download != null) {
|
||||
download.dispose();
|
||||
}
|
||||
if(parser != null) {
|
||||
if (parser != null) {
|
||||
parser.dispose();
|
||||
}
|
||||
}
|
||||
@ -464,7 +464,7 @@ public class OnlineFeedViewActivity extends AppCompatActivity {
|
||||
.setAdapter(adapter, onClickListener);
|
||||
|
||||
runOnUiThread(() -> {
|
||||
if(dialog != null && dialog.isShowing()) {
|
||||
if (dialog != null && dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
dialog = ab.show();
|
||||
|
||||
@ -822,6 +822,8 @@ public class VideoplayerActivity extends CastEnabledActivity implements SeekBar.
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//Go to x% of video:
|
||||
|
||||
@ -76,7 +76,7 @@ public class PlaybackPreferencesFragment extends AnimatedPreferenceFragment {
|
||||
if (!(newValue instanceof String)) {
|
||||
return false;
|
||||
}
|
||||
String newValStr = (String)newValue;
|
||||
String newValStr = (String) newValue;
|
||||
pref.setSummary(res.getString(R.string.pref_enqueue_location_sum, options.get(newValStr)));
|
||||
return true;
|
||||
});
|
||||
@ -100,11 +100,11 @@ public class PlaybackPreferencesFragment extends AnimatedPreferenceFragment {
|
||||
String[] values = res.getStringArray(R.array.smart_mark_as_played_values);
|
||||
String[] entries = new String[values.length];
|
||||
for (int x = 0; x < values.length; x++) {
|
||||
if(x == 0) {
|
||||
if (x == 0) {
|
||||
entries[x] = res.getString(R.string.pref_smart_mark_as_played_disabled);
|
||||
} else {
|
||||
int v = Integer.parseInt(values[x]);
|
||||
if(v < 60) {
|
||||
if (v < 60) {
|
||||
entries[x] = res.getQuantityString(R.plurals.time_seconds_quantified, v, v);
|
||||
} else {
|
||||
v /= 60;
|
||||
|
||||
@ -138,7 +138,7 @@ public class QueueFragment extends Fragment implements MaterialToolbar.OnMenuIte
|
||||
loadItems(true);
|
||||
return;
|
||||
}
|
||||
switch(event.action) {
|
||||
switch (event.action) {
|
||||
case ADDED:
|
||||
queue.add(event.position, event.item);
|
||||
recyclerAdapter.notifyItemInserted(event.position);
|
||||
@ -158,7 +158,7 @@ public class QueueFragment extends Fragment implements MaterialToolbar.OnMenuIte
|
||||
queue.clear();
|
||||
recyclerAdapter.updateItems(queue);
|
||||
break;
|
||||
case MOVED:
|
||||
default:
|
||||
return;
|
||||
}
|
||||
recyclerAdapter.updateDragDropEnabled();
|
||||
|
||||
@ -11,20 +11,16 @@
|
||||
<suppress checks="." files="[\\/].idea[\\/]"/>
|
||||
|
||||
<!-- Legacy code, should be gradually updated when touching these lines anyway -->
|
||||
<suppress checks="LineLength" files="(VolumeAdaptionSettingTest.java|MediaMetadataRetrieverCompat.java|FeedItem.java|FeedMedia.java|FeedPreferences.java|Feed.java|DBUpgrader.java|PodDBAdapter.java|PlaybackServiceMediaPlayer.java|PlaybackService.java|LocalPSMP.java|PlaybackServiceTaskManager.java|DBWriter.java|PodcastSearchResult.java|PlaybackServiceTaskManagerTest.java|HTTPBin.java|SPAReceiver.java|UriUtil.java|FeedDiscovererTest.java|PlaybackServiceMediaPlayerTest.java|TextOnlyFeedsTest.java|ItemFragment.java|FeedSettingsFragment.java|UITestUtils.java)"/>
|
||||
<suppress checks="VariableDeclarationUsageDistance" files="(FeedFilterTest.java|ChapterReader.java|FastBlurTransformation.java|GpodnetService.java|PreferencesTest.java|ItemFilterDialog.java|ItemFragment.java|PlaybackServiceMediaPlayerTest.java)"/>
|
||||
<suppress checks="ParameterName" files="(FeedMedia.java)"/>
|
||||
<suppress checks="WhitespaceAround" files="(FeedMedia.java|UserPreferences.java|LongList.java|IntentUtils.java|PlaybackServiceMediaPlayer.java|ShakeListener.java|LocalPSMP.java|PodcastSearchResult.java|NetworkUtils.java|UITestUtils.java|PlaybackPreferencesFragment.java|OnlineFeedViewActivity.java|QueueFragment.java|SPAReceiver.java|SkipIntroEndingChangedEvent.java|GeneratorUtil.java|RewindAfterPauseUtils.java|PlaybackController.java|AutoDownloadPreferencesFragment.java)"/>
|
||||
<suppress checks="WhitespaceAfter" files="(FeedMedia.java|LongList.java|IntentUtils.java|TimeSpeedConverter.java|LocalPSMP.java|PlaybackController.java|PodcastSearchResult.java|PlaybackPreferencesFragment.java|OnlineFeedViewActivity.java|QueueFragment.java)"/>
|
||||
<suppress checks="LineLength" files="(VolumeAdaptionSettingTest.java|DBUpgrader.java|PlaybackServiceMediaPlayer.java|PlaybackService.java|LocalPSMP.java|PlaybackServiceTaskManager.java|DBWriter.java|PodcastSearchResult.java|PlaybackServiceTaskManagerTest.java|HTTPBin.java|SPAReceiver.java|UriUtil.java|FeedDiscovererTest.java|PlaybackServiceMediaPlayerTest.java|UITestUtils.java)"/>
|
||||
<suppress checks="VariableDeclarationUsageDistance" files="(FeedFilterTest.java|ChapterReader.java|FastBlurTransformation.java|PreferencesTest.java|ItemFilterDialog.java|PlaybackServiceMediaPlayerTest.java)"/>
|
||||
<suppress checks="WhitespaceAround" files="(LongList.java|IntentUtils.java|PlaybackServiceMediaPlayer.java|ShakeListener.java|LocalPSMP.java|PodcastSearchResult.java|UITestUtils.java|SPAReceiver.java|SkipIntroEndingChangedEvent.java|PlaybackController.java)"/>
|
||||
<suppress checks="WhitespaceAfter" files="(LongList.java|IntentUtils.java|TimeSpeedConverter.java|LocalPSMP.java|PlaybackController.java|PodcastSearchResult.java)"/>
|
||||
<suppress checks="AbbreviationAsWordInName" files="(FeedItemPermutorsTest.java|DBUpgrader.java|PodDBAdapter.java|DBWriter.java|DBReader.java|RewindAfterPauseUtilTest.java|PlaybackServiceMediaPlayer.java|PlaybackService.java|LocalPSMP.java|PlaybackServiceTaskManager.java|GpodnetUploadChangesResponse.java|GpodnetEpisodeActionPostResponse.java|UrlCheckerTest.java|UriUtilTest.java|UriUtil.java|PlaybackServiceTaskManagerTest.java|SPAUtil.java|FeedDiscovererTest.java|PlaybackServiceMediaPlayerTest.java|DefaultPSMPCallback.java|UITestUtils.java|APCleanupAlgorithmTest.java|APNullCleanupAlgorithm.java|APCleanupAlgorithm.java|HTTPBin.java|UITestUtilsTest.java|FeedDiscoverer.java|SPAReceiver.java|APQueueCleanupAlgorithm.java|CancelablePSMPCallback.java)"/>
|
||||
<suppress checks="NeedBraces" files="(PlaybackServiceMediaPlayerTest.java|FeedPreferences.java|DownloadRequest.java|HTTPBin.java|UITestUtils.java|SPAUtil.java)"/>
|
||||
<suppress checks="NonEmptyAtclauseDescription" files="(FeedFilter.java|AspectRatioVideoView.java|Playable.java|PlaybackServiceTaskManager.java|PodcastSearchResult.java|OpmlBackupAgent.java)"/>
|
||||
<suppress checks="OperatorWrapCheck" files="(Atom.java|DBUpgrader.java|PodDBAdapter.java|PlaybackController.java|GpodnetUploadChangesResponse.java|HtmlToPlainText.java|PodcastSearchResult.java|PowerConnectionReceiver.java|FeedDiscoverer.java|DBWriter.java|PlaybackService.java)"/>
|
||||
<suppress checks="RightCurlyAlone" files="(UserPreferences.java|LockableBottomSheetBehavior.java|NetworkUtils.java|ProxyDialog.java|IntentUtils.java|RewindAfterPauseUtils.java|GpodnetPodcast.java|GeneratorUtil.java|PlaybackController.java|AntennapodHttpClient.java|UriUtil.java|APCleanupAlgorithm.java)"/>
|
||||
<suppress checks="OperatorWrapCheck" files="(Atom.java|DBUpgrader.java|PodDBAdapter.java|PlaybackController.java|GpodnetUploadChangesResponse.java|HtmlToPlainText.java|PodcastSearchResult.java|PowerConnectionReceiver.java|FeedDiscoverer.java|PlaybackService.java)"/>
|
||||
<suppress checks="JavadocParagraph" files="(FeedItemPermutors.java|HtmlToPlainText.java|FeedItemMenuHandler.java|RewindAfterPauseUtils.java|PlaybackServiceMediaPlayer.java|UITestUtils.java|NestedScrollableHost.java|PlaybackService.java)"/>
|
||||
<suppress checks="JavadocTagContinuationIndentation" files="(ItemEnqueuePositionCalculator.java|LongList.java|DBReader.java|LocalPSMP.java|GpodnetService.java|FeedDiscoverer.java|SPAUtil.java|PlaybackServiceMediaPlayer.java)"/>
|
||||
<suppress checks="JavadocTagContinuationIndentation" files="(LongList.java|DBReader.java|LocalPSMP.java|GpodnetService.java|FeedDiscoverer.java|SPAUtil.java|PlaybackServiceMediaPlayer.java)"/>
|
||||
<suppress checks="MemberName" files="(OpmlBackupAgent.java|ShakeListener.java|PlaybackController.java|AspectRatioVideoView.java|PlaybackService.java|PlaybackServiceMediaPlayerTest.java)"/>
|
||||
<suppress checks="LocalVariableName" files="(ShakeListener.java|ItemEnqueuePositionCalculatorTest.java)"/>
|
||||
<suppress checks="LeftCurly" files="(GpodnetPodcast.java|APCleanupAlgorithm.java|APQueueCleanupAlgorithm.java)"/>
|
||||
<suppress checks="MissingSwitchDefaultCheck" files="(MainActivity.java|FeedSettingsFragment.java|QueueFragment.java|VideoplayerActivity.java|PlaybackController.java|PreferenceUpgrader.java)"/>
|
||||
</suppressions>
|
||||
|
||||
@ -154,8 +154,8 @@ public class Feed {
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor is used for requesting a feed download (it must not be used for anything else!). It should NOT be
|
||||
* used if the title of the feed is already known.
|
||||
* This constructor is used for requesting a feed download (it must not be used for anything else!).
|
||||
* It should NOT be used if the title of the feed is already known.
|
||||
*/
|
||||
public Feed(String url, String lastModified) {
|
||||
this.localFileUrl = null;
|
||||
@ -179,8 +179,9 @@ public class Feed {
|
||||
*/
|
||||
public Feed(String url, String lastModified, String title, String username, String password) {
|
||||
this(url, lastModified, title);
|
||||
preferences = new FeedPreferences(0, FeedPreferences.AutoDownloadSetting.GLOBAL, FeedPreferences.AutoDeleteAction.GLOBAL, VolumeAdaptionSetting.OFF,
|
||||
FeedPreferences.NewEpisodesAction.GLOBAL, username, password);
|
||||
preferences = new FeedPreferences(0, FeedPreferences.AutoDownloadSetting.GLOBAL,
|
||||
FeedPreferences.AutoDeleteAction.GLOBAL, VolumeAdaptionSetting.OFF,
|
||||
FeedPreferences.NewEpisodesAction.GLOBAL, username, password);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -125,7 +125,8 @@ public class FeedItem implements Serializable {
|
||||
/**
|
||||
* This constructor should be used for creating test objects involving chapter marks.
|
||||
*/
|
||||
public FeedItem(long id, String title, String itemIdentifier, String link, Date pubDate, int state, Feed feed, boolean hasChapters) {
|
||||
public FeedItem(long id, String title, String itemIdentifier, String link, Date pubDate,
|
||||
int state, Feed feed, boolean hasChapters) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.itemIdentifier = itemIdentifier;
|
||||
|
||||
@ -190,8 +190,8 @@ public class FeedMedia implements Playable {
|
||||
return playedDurationWhenStarted;
|
||||
}
|
||||
|
||||
public void setPlayedDuration(int played_duration) {
|
||||
this.playedDuration = played_duration;
|
||||
public void setPlayedDuration(int playedDuration) {
|
||||
this.playedDuration = playedDuration;
|
||||
}
|
||||
|
||||
public int getPosition() {
|
||||
@ -205,7 +205,7 @@ public class FeedMedia implements Playable {
|
||||
|
||||
public void setPosition(int position) {
|
||||
this.position = position;
|
||||
if(position > 0 && item != null && item.isNew()) {
|
||||
if (position > 0 && item != null && item.isNew()) {
|
||||
this.item.setPlayed(false);
|
||||
}
|
||||
}
|
||||
@ -280,7 +280,7 @@ public class FeedMedia implements Playable {
|
||||
}
|
||||
|
||||
public boolean hasEmbeddedPicture() {
|
||||
if(hasEmbeddedPicture == null) {
|
||||
if (hasEmbeddedPicture == null) {
|
||||
checkEmbeddedPicture();
|
||||
}
|
||||
return hasEmbeddedPicture;
|
||||
@ -444,8 +444,9 @@ public class FeedMedia implements Playable {
|
||||
public FeedMedia createFromParcel(Parcel in) {
|
||||
final long id = in.readLong();
|
||||
final long itemID = in.readLong();
|
||||
FeedMedia result = new FeedMedia(id, null, in.readInt(), in.readInt(), in.readLong(), in.readString(), in.readString(),
|
||||
in.readString(), in.readLong(), new Date(in.readLong()), in.readInt(), in.readLong());
|
||||
FeedMedia result = new FeedMedia(id, null, in.readInt(), in.readInt(), in.readLong(), in.readString(),
|
||||
in.readString(), in.readString(), in.readLong(), new Date(in.readLong()),
|
||||
in.readInt(), in.readLong());
|
||||
result.itemID = itemID;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -178,8 +178,8 @@ public class FeedPreferences implements Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Update this FeedPreferences object from another one. The feedID, autoDownload and AutoDeleteAction attributes are excluded
|
||||
* from the update.
|
||||
* Update this FeedPreferences object from another one. The feedID, autoDownload and AutoDeleteAction attributes
|
||||
* are excluded from the update.
|
||||
*/
|
||||
public void updateFromOther(FeedPreferences other) {
|
||||
if (other == null)
|
||||
|
||||
@ -37,8 +37,7 @@ public class APCleanupAlgorithm extends EpisodeCleanupAlgorithm {
|
||||
/**
|
||||
* @return the number of episodes that *could* be cleaned up, if needed
|
||||
*/
|
||||
public int getReclaimableItems()
|
||||
{
|
||||
public int getReclaimableItems() {
|
||||
return getCandidates().size();
|
||||
}
|
||||
|
||||
|
||||
@ -28,8 +28,7 @@ public class APQueueCleanupAlgorithm extends EpisodeCleanupAlgorithm {
|
||||
/**
|
||||
* @return the number of episodes that *could* be cleaned up, if needed
|
||||
*/
|
||||
public int getReclaimableItems()
|
||||
{
|
||||
public int getReclaimableItems() {
|
||||
return getCandidates().size();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user