diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index 178fcefe16f..627e85fe130 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -924,7 +924,7 @@ private void checkSelectedDownload(final StoredDirectoryHelper mainStorage, } else if (targetFile == null) { // This part is called if: // * the filename is not used in a pending/finished download - // * the file does not exists, create + // * the file does not exist, create if (!mainStorage.mkdirs()) { showFailedDialog(R.string.error_path_creation); diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index b5b2228ca9a..39bdb7fb193 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -186,7 +186,9 @@ public final class Player implements PlaybackListener, Listener { // Playback //////////////////////////////////////////////////////////////////////////*/ - // play queue might be null e.g. while player is starting + /** + * The play queue might be {@code null} e.g. while player is starting + */ @Nullable private PlayQueue playQueue; @@ -230,8 +232,10 @@ public final class Player implements PlaybackListener, Listener { private PlayerType playerType = PlayerType.MAIN; private int currentState = STATE_PREFLIGHT; - // audio only mode does not mean that player type is background, but that the player was - // minimized to background but will resume automatically to the original player type + /** + * Audio-only mode does not mean that player type is background, but that the player was + * minimized to background and will change to the original player type automatically. + */ private boolean isAudioOnly = false; private boolean isPrepared = false; @@ -934,7 +938,7 @@ public void onSuccess(@NonNull final coil3.Image result) { private void onThumbnailLoaded(@Nullable final Bitmap bitmap) { // Avoid useless thumbnail updates, if the thumbnail has not actually changed. Based on the - // thumbnail loading code, this if would be skipped only when both bitmaps are `null`, since + // thumbnail loading code, this would be skipped only when both bitmaps are `null`, since // onThumbnailLoaded won't be called twice with the same nonnull bitmap by Coil's target. if (currentThumbnail != bitmap) { currentThumbnail = bitmap; @@ -1522,7 +1526,7 @@ public void onPrepare() { *
* If media requests are relative, the URI from which the manifest comes from (either the * manifest URI (preferred) or the master URI (if applicable)) must be returned, otherwise the - * content will be not playable, as it will be an invalid URL, or it may be treat as something + * content will be not playable, as it will be an invalid URL, or it may be treated as something * unexpected, for instance as a file for * {@link com.google.android.exoplayer2.upstream.DefaultDataSource DefaultDataSource}s. *
diff --git a/app/src/main/java/org/schabi/newpipe/player/gesture/PopupPlayerGestureListener.kt b/app/src/main/java/org/schabi/newpipe/player/gesture/PopupPlayerGestureListener.kt index 60752652ea9..ea74f4c7f0c 100644 --- a/app/src/main/java/org/schabi/newpipe/player/gesture/PopupPlayerGestureListener.kt +++ b/app/src/main/java/org/schabi/newpipe/player/gesture/PopupPlayerGestureListener.kt @@ -258,7 +258,7 @@ class PopupPlayerGestureListener( // -- Determine if the ClosingOverlayView (red X) has to be shown or hidden -- val showClosingOverlayView: Boolean = playerUi.isInsideClosingRadius(movingEvent) - // Check if an view is in expected state and if not animate it into the correct state + // Check if a view is in expected state and if not animate it into the correct state if (binding.closingOverlay.isVisible != showClosingOverlayView) { binding.closingOverlay.animate(showClosingOverlayView, 200) } diff --git a/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java b/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java index b9ca90d89fa..e0b32b73c1f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java +++ b/app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java @@ -98,7 +98,7 @@ public MediaItem getMediaItem() { ** May be called at any time. *
diff --git a/app/src/main/java/org/schabi/newpipe/player/playback/SurfaceHolderCallback.java b/app/src/main/java/org/schabi/newpipe/player/playback/SurfaceHolderCallback.java index da6cb36d4fb..4340d32bd1f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playback/SurfaceHolderCallback.java +++ b/app/src/main/java/org/schabi/newpipe/player/playback/SurfaceHolderCallback.java @@ -8,11 +8,11 @@ /** * Prevent error message: 'Unrecoverable player error occurred' - * In case of rotation some users see this kind of an error which is preventable + * In case of rotation some users see this kind of error which is preventable * having a Callback that handles the lifecycle of the surface. *- * How?: In case we are no longer able to write to the surface eg. through rotation/putting in - * background we set set a DummySurface. Although it it works on API >= 23 only. + * How?: In case we are no longer able to write to the surface e.g. through rotation/putting in + * background we set a DummySurface. Although it works on API >= 23 only. * Result: we get a little video interruption (audio is still fine) but we won't get the * 'Unrecoverable player error occurred' error message. *
diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java index 8a66dc2ffac..9c7d0e20fd7 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/PlayQueue.java @@ -373,7 +373,7 @@ private synchronized void removeInternal(final int removeIndex) { * to that of the target. * If the moved item is not the currently playing and moves to an index AFTER the * current playing index, then the current playing index is decremented. - * Vice versa if the an item after the currently playing is moved BEFORE. + * Vice versa if an item after the currently playing is moved BEFORE. *
* * @param source the original index of the item diff --git a/app/src/main/java/org/schabi/newpipe/player/ui/PopupPlayerUi.java b/app/src/main/java/org/schabi/newpipe/player/ui/PopupPlayerUi.java index b9c29c00845..4dbbb471cca 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ui/PopupPlayerUi.java +++ b/app/src/main/java/org/schabi/newpipe/player/ui/PopupPlayerUi.java @@ -243,7 +243,7 @@ public void onBroadcastReceived(final Intent intent) { //region Popup position and size /** - * Check if {@link #popupLayoutParams}' position is within a arbitrary boundary + * Check if {@link #popupLayoutParams}' position is within an arbitrary boundary * that goes from (0, 0) to (screenWidth, screenHeight). ** If it's out of these boundaries, {@link #popupLayoutParams}' position is changed diff --git a/app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java b/app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java index 563927e19f4..65af3c44ae7 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java +++ b/app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.java @@ -810,7 +810,7 @@ public boolean isFullscreen() { /** * Update the play/pause button ({@link R.id.playPauseButton}) to reflect the action - * that will be performed when the button is clicked.. + * that will be performed when the button is clicked. * @param action the action that is performed when the play/pause button is clicked */ private void updatePlayPauseButton(final PlayButtonAction action) {