From 7a8dab2d589f449174b422d6927e24e1cee808f3 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Sun, 22 Nov 2020 10:39:00 +0100 Subject: [PATCH] Fix typos --- .../java/org/schabi/newpipe/CheckForNewAppVersion.java | 4 ++-- .../subscription/services/ImportExportEventListener.java | 2 +- .../main/java/org/schabi/newpipe/player/BasePlayer.java | 2 +- .../org/schabi/newpipe/player/ServicePlayerActivity.java | 2 +- .../org/schabi/newpipe/player/helper/LoadController.java | 4 ++-- .../newpipe/player/playqueue/AbstractInfoPlayQueue.java | 4 ++-- .../java/org/schabi/newpipe/util/KioskTranslator.java | 2 +- app/src/main/java/org/schabi/newpipe/util/ListHelper.java | 8 ++++---- .../us/shandian/giga/get/DownloadRunnableFallback.java | 2 +- .../test/java/org/schabi/newpipe/util/ListHelperTest.java | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersion.java b/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersion.java index 1bec52dcd..6ec5a89ac 100644 --- a/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersion.java +++ b/app/src/main/java/org/schabi/newpipe/CheckForNewAppVersion.java @@ -53,10 +53,10 @@ public final class CheckForNewAppVersion { private static final String NEWPIPE_API_URL = "https://newpipe.schabi.org/api/data.json"; /** - * Method to get the apk's SHA1 key. See https://stackoverflow.com/questions/9293019/#22506133. + * Method to get the APK's SHA1 key. See https://stackoverflow.com/questions/9293019/#22506133. * * @param application The application - * @return String with the apk's SHA1 fingeprint in hexadecimal + * @return String with the APK's SHA1 fingerprint in hexadecimal */ private static String getCertificateSHA1Fingerprint(@NonNull final Application application) { final PackageManager pm = application.getPackageManager(); diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/services/ImportExportEventListener.java b/app/src/main/java/org/schabi/newpipe/local/subscription/services/ImportExportEventListener.java index 34bd68f5e..7352d1f12 100644 --- a/app/src/main/java/org/schabi/newpipe/local/subscription/services/ImportExportEventListener.java +++ b/app/src/main/java/org/schabi/newpipe/local/subscription/services/ImportExportEventListener.java @@ -9,7 +9,7 @@ public interface ImportExportEventListener { void onSizeReceived(int size); /** - * Called everytime an item has been parsed/resolved. + * Called every time an item has been parsed/resolved. * * @param itemName the name of the subscription item */ diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 4790dc029..5207cd0b7 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -685,7 +685,7 @@ public abstract class BasePlayer implements public void onMuteUnmuteButtonClicked() { if (DEBUG) { - Log.d(TAG, "onMuteUnmuteButtonClicled() called"); + Log.d(TAG, "onMuteUnmuteButtonClicked() called"); } simpleExoPlayer.setVolume(isMuted() ? 1 : 0); } diff --git a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java index ad4c603cd..d1c2be014 100644 --- a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java +++ b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java @@ -618,7 +618,7 @@ public abstract class ServicePlayerActivity extends AppCompatActivity progressLiveSync.setClickable(!player.isLiveEdge()); } - // this will make shure progressCurrentTime has the same width as progressEndTime + // this will make sure progressCurrentTime has the same width as progressEndTime final ViewGroup.LayoutParams endTimeParams = progressEndTime.getLayoutParams(); final ViewGroup.LayoutParams currentTimeParams = progressCurrentTime.getLayoutParams(); currentTimeParams.width = progressEndTime.getWidth(); diff --git a/app/src/main/java/org/schabi/newpipe/player/helper/LoadController.java b/app/src/main/java/org/schabi/newpipe/player/helper/LoadController.java index d123a263b..0604e6ae8 100644 --- a/app/src/main/java/org/schabi/newpipe/player/helper/LoadController.java +++ b/app/src/main/java/org/schabi/newpipe/player/helper/LoadController.java @@ -26,12 +26,12 @@ public class LoadController implements LoadControl { } private LoadController(final int initialPlaybackBufferMs, - final int minimumPlaybackbufferMs, + final int minimumPlaybackBufferMs, final int optimalPlaybackBufferMs) { this.initialPlaybackBufferUs = initialPlaybackBufferMs * 1000; final DefaultLoadControl.Builder builder = new DefaultLoadControl.Builder(); - builder.setBufferDurationsMs(minimumPlaybackbufferMs, optimalPlaybackBufferMs, + builder.setBufferDurationsMs(minimumPlaybackBufferMs, optimalPlaybackBufferMs, initialPlaybackBufferMs, initialPlaybackBufferMs); internalLoadControl = builder.createDefaultLoadControl(); } diff --git a/app/src/main/java/org/schabi/newpipe/player/playqueue/AbstractInfoPlayQueue.java b/app/src/main/java/org/schabi/newpipe/player/playqueue/AbstractInfoPlayQueue.java index ec364c4df..5cb8bf738 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playqueue/AbstractInfoPlayQueue.java +++ b/app/src/main/java/org/schabi/newpipe/player/playqueue/AbstractInfoPlayQueue.java @@ -128,9 +128,9 @@ abstract class AbstractInfoPlayQueue ext fetchReactor = null; } - private static List extractListItems(final List infos) { + private static List extractListItems(final List infoItems) { final List result = new ArrayList<>(); - for (final InfoItem stream : infos) { + for (final InfoItem stream : infoItems) { if (stream instanceof StreamInfoItem) { result.add(new PlayQueueItem((StreamInfoItem) stream)); } diff --git a/app/src/main/java/org/schabi/newpipe/util/KioskTranslator.java b/app/src/main/java/org/schabi/newpipe/util/KioskTranslator.java index b676a1a88..ccd4d13fc 100644 --- a/app/src/main/java/org/schabi/newpipe/util/KioskTranslator.java +++ b/app/src/main/java/org/schabi/newpipe/util/KioskTranslator.java @@ -5,7 +5,7 @@ import android.content.Context; import org.schabi.newpipe.R; /** - * Created by Chrsitian Schabesberger on 28.09.17. + * Created by Christian Schabesberger on 28.09.17. * KioskTranslator.java is part of NewPipe. *

* NewPipe is free software: you can redistribute it and/or modify diff --git a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java index 0c840f8c3..5f8fb5898 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java @@ -141,7 +141,7 @@ public final class ListHelper { final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); - // Load the prefered resolution otherwise the best available + // Load the preferred resolution otherwise the best available String resolution = preferences != null ? preferences.getString(context.getString(key), context.getString(value)) : context.getString(R.string.best_resolution_key); @@ -161,7 +161,7 @@ public final class ListHelper { * * @param defaultResolution the default resolution to look for * @param bestResolutionKey key of the best resolution - * @param defaultFormat the default fomat to look for + * @param defaultFormat the default format to look for * @param videoStreams list of the video streams to check * @return index of the default resolution&format */ @@ -351,7 +351,7 @@ public final class ListHelper { * @param targetResolution the resolution to look for * @param targetFormat the format to look for * @param videoStreams the available video streams - * @return the index of the prefered video stream + * @return the index of the preferred video stream */ static int getVideoStreamIndex(final String targetResolution, final MediaFormat targetFormat, final List videoStreams) { @@ -413,7 +413,7 @@ public final class ListHelper { * @param context Android app context * @param defaultResolution the default resolution * @param videoStreams the list of video streams to check - * @return the index of the prefered video stream + * @return the index of the preferred video stream */ private static int getDefaultResolutionWithDefaultFormat(final Context context, final String defaultResolution, diff --git a/app/src/main/java/us/shandian/giga/get/DownloadRunnableFallback.java b/app/src/main/java/us/shandian/giga/get/DownloadRunnableFallback.java index 9cb40cb32..eed5db463 100644 --- a/app/src/main/java/us/shandian/giga/get/DownloadRunnableFallback.java +++ b/app/src/main/java/us/shandian/giga/get/DownloadRunnableFallback.java @@ -21,7 +21,7 @@ import static us.shandian.giga.get.DownloadMission.ERROR_HTTP_FORBIDDEN; * Single-threaded fallback mode */ public class DownloadRunnableFallback extends Thread { - private static final String TAG = "DownloadRunnableFallbac"; + private static final String TAG = "DownloadRunnableFallback"; private final DownloadMission mMission; diff --git a/app/src/test/java/org/schabi/newpipe/util/ListHelperTest.java b/app/src/test/java/org/schabi/newpipe/util/ListHelperTest.java index 8cd99cc04..d126f8473 100644 --- a/app/src/test/java/org/schabi/newpipe/util/ListHelperTest.java +++ b/app/src/test/java/org/schabi/newpipe/util/ListHelperTest.java @@ -205,7 +205,7 @@ public class ListHelperTest { assertEquals(MediaFormat.M4A, stream.getFormat()); // Adding a new format and bitrate. Adding another stream will have no impact since - // it's not a prefered format. + // it's not a preferred format. testList.add(new AudioStream("", MediaFormat.WEBMA, /**/ 192)); stream = testList.get(ListHelper.getHighestQualityAudioIndex(MediaFormat.MP3, testList)); assertEquals(192, stream.average_bitrate);