Enforce MethodParamPad

This commit is contained in:
ByteHamster 2020-02-02 17:52:21 +01:00
parent 8f08bd1f6d
commit b656cb91a2
8 changed files with 11 additions and 9 deletions

View File

@ -770,7 +770,7 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements
private float prog; private float prog;
@Override @Override
public void onProgressChanged (SeekBar seekBar,int progress, boolean fromUser) { public void onProgressChanged(SeekBar seekBar,int progress, boolean fromUser) {
if (controller == null || txtvLength == null) { if (controller == null || txtvLength == null) {
return; return;
} }

View File

@ -98,7 +98,7 @@ public class VideoplayerActivity extends MediaplayerActivity {
} }
@Override @Override
public void onUserLeaveHint () { public void onUserLeaveHint() {
if (!PictureInPictureUtil.isInPictureInPictureMode(this) && UserPreferences.getVideoBackgroundBehavior() if (!PictureInPictureUtil.isInPictureInPictureMode(this) && UserPreferences.getVideoBackgroundBehavior()
== UserPreferences.VideoBackgroundBehavior.PICTURE_IN_PICTURE) { == UserPreferences.VideoBackgroundBehavior.PICTURE_IN_PICTURE) {
compatEnterPictureInPicture(); compatEnterPictureInPicture();

View File

@ -245,7 +245,7 @@ public class EpisodesApplyActionFragment extends Fragment {
} }
@Override @Override
public void onPrepareOptionsMenu (Menu menu) { public void onPrepareOptionsMenu(Menu menu) {
// Prepare icon for select toggle button // Prepare icon for select toggle button
int[] icon = new int[1]; int[] icon = new int[1];

View File

@ -550,8 +550,9 @@ public class QueueFragment extends Fragment {
final boolean isRead = item.isPlayed(); final boolean isRead = item.isPlayed();
DBWriter.markItemPlayed(FeedItem.PLAYED, false, item.getId()); DBWriter.markItemPlayed(FeedItem.PLAYED, false, item.getId());
DBWriter.removeQueueItem(getActivity(), true, item); DBWriter.removeQueueItem(getActivity(), true, item);
Snackbar snackbar = Snackbar.make Snackbar snackbar = Snackbar.make(root, getString(item.hasMedia()
(root, getString(item.hasMedia() ? R.string.marked_as_read_label: R.string.marked_as_read_no_media_label), Snackbar.LENGTH_LONG); ? R.string.marked_as_read_label : R.string.marked_as_read_no_media_label),
Snackbar.LENGTH_LONG);
snackbar.setAction(getString(R.string.undo), v -> { snackbar.setAction(getString(R.string.undo), v -> {
DBWriter.addQueueItemAt(getActivity(), item.getId(), position, false); DBWriter.addQueueItemAt(getActivity(), item.getId(), position, false);
if(!isRead) { if(!isRead) {

View File

@ -78,6 +78,7 @@
<message key="ws.notPreceded" <message key="ws.notPreceded"
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/> value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
</module> </module>
<module name="MethodParamPad"/>
<module name="NoWhitespaceBefore"> <module name="NoWhitespaceBefore">
<property name="tokens" <property name="tokens"
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/> value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>

View File

@ -1325,7 +1325,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
if (isInitialStickyBroadcast ()) { if (isInitialStickyBroadcast()) {
// Don't pause playback after we just started, just because the receiver // Don't pause playback after we just started, just because the receiver
// delivers the current headset state (instead of a change) // delivers the current headset state (instead of a change)
return; return;

View File

@ -154,7 +154,7 @@ public final class LongList {
growIfNeeded(); growIfNeeded();
System.arraycopy (values, n, values, n+1, size - n); System.arraycopy(values, n, values, n+1, size - n);
values[n] = value; values[n] = value;
size++; size++;
} }
@ -211,7 +211,7 @@ public final class LongList {
throw new IndexOutOfBoundsException("n < 0"); throw new IndexOutOfBoundsException("n < 0");
} }
size--; size--;
System.arraycopy (values, index + 1, values, index, size - index); System.arraycopy(values, index + 1, values, index, size - index);
} }
/** /**

View File

@ -64,7 +64,7 @@ public class RemotePSMP extends PlaybackServiceMediaPlayer {
remoteState = MediaStatus.PLAYER_STATE_UNKNOWN; remoteState = MediaStatus.PLAYER_STATE_UNKNOWN;
} }
public void init () { public void init() {
try { try {
if (castMgr.isConnected() && castMgr.isRemoteMediaLoaded()) { if (castMgr.isConnected() && castMgr.isRemoteMediaLoaded()) {
onRemoteMediaPlayerStatusUpdated(); onRemoteMediaPlayerStatusUpdated();