chore: Lint code

This commit is contained in:
inotia00 2025-03-26 15:08:28 +09:00
parent a764e3aea3
commit 9d37e31a24
16 changed files with 35 additions and 41 deletions

View File

@ -9,7 +9,6 @@ import androidx.annotation.Nullable;
import org.apache.commons.lang3.BooleanUtils;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;

View File

@ -2,7 +2,6 @@ package app.revanced.extension.shared.patches;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
import static app.revanced.extension.shared.utils.Utils.newSpanUsingStylingOfAnotherSpan;
import androidx.annotation.NonNull;

View File

@ -2,8 +2,8 @@ package app.revanced.extension.shared.patches;
import android.net.Uri;
import app.revanced.extension.shared.utils.Logger;
import app.revanced.extension.shared.settings.BaseSettings;
import app.revanced.extension.shared.utils.Logger;
@SuppressWarnings("unused")
public final class WatchHistoryPatch {

View File

@ -149,7 +149,7 @@ public abstract class AbstractPreferenceFragment extends PreferenceFragment {
* Updates all Preferences values and their availability using the current values in {@link Setting}.
*/
protected void updateUIToSettingValues() {
updatePreferenceScreen(getPreferenceScreen(), true,true);
updatePreferenceScreen(getPreferenceScreen(), true, true);
}
/**

View File

@ -608,10 +608,10 @@ public class Utils {
* <br>
* Be aware the on start action can be called multiple times for some situations,
* such as the user switching apps without dismissing the dialog then switching back to this app.
*<br>
* <br>
* This method is only useful during app startup and multiple patches may show their own dialog,
* and the most important dialog can be called last (using a delay) so it's always on top.
*<br>
* <br>
* For all other situations it's better to not use this method and
* call {@link AlertDialog#show()} on the dialog.
*/

View File

@ -6,7 +6,6 @@ import app.revanced.extension.shared.patches.components.ByteArrayFilterGroup;
import app.revanced.extension.shared.patches.components.ByteArrayFilterGroupList;
import app.revanced.extension.shared.patches.components.Filter;
import app.revanced.extension.shared.patches.components.StringFilterGroup;
import app.revanced.extension.shared.settings.BooleanSetting;
import app.revanced.extension.youtube.settings.Settings;
@SuppressWarnings("unused")

View File

@ -6,7 +6,6 @@ import app.revanced.extension.shared.settings.Setting.Availability
import app.revanced.extension.shared.utils.Logger
import app.revanced.extension.youtube.settings.Settings
import org.apache.commons.lang3.StringUtils
import kotlin.Boolean
@Suppress("unused")
object ChangeStartPagePatch {
@ -44,7 +43,7 @@ object ChangeStartPagePatch {
}
appLaunched = true
Logger.printDebug{ "Changing browseId to $browseId" }
Logger.printDebug { "Changing browseId to $browseId" }
return browseId
}

View File

@ -39,7 +39,7 @@ public final class DownloadActionsPatch {
* <p>
* Appears to always be called from the main thread.
*/
public static boolean inAppVideoDownloadButtonOnClick(@Nullable Map<Object, Object> map,Object offlineVideoEndpointOuterClass,
public static boolean inAppVideoDownloadButtonOnClick(@Nullable Map<Object, Object> map, Object offlineVideoEndpointOuterClass,
@Nullable String videoId) {
try {
if (OVERRIDE_VIDEO_DOWNLOAD_BUTTON && StringUtils.isNotEmpty(videoId)) {

View File

@ -2,7 +2,6 @@ package app.revanced.extension.youtube.patches.misc;
import app.revanced.extension.shared.settings.BooleanSetting;
import app.revanced.extension.youtube.settings.Settings;
import app.revanced.extension.youtube.shared.PlayerType;
import app.revanced.extension.youtube.shared.ShortsPlayerState;
@SuppressWarnings("unused")

View File

@ -1,5 +1,7 @@
package app.revanced.extension.youtube.patches.player;
import static app.revanced.extension.youtube.patches.player.ActionButtonsPatch.ActionButton.REMIX;
import androidx.annotation.Nullable;
import org.apache.commons.lang3.ArrayUtils;
@ -8,8 +10,6 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map;
import static app.revanced.extension.youtube.patches.player.ActionButtonsPatch.ActionButton.*;
import app.revanced.extension.shared.settings.BooleanSetting;
import app.revanced.extension.shared.utils.Logger;
import app.revanced.extension.shared.utils.Utils;

View File

@ -24,7 +24,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
import app.revanced.extension.shared.settings.BaseSettings;
import app.revanced.extension.shared.settings.BooleanSetting;
import app.revanced.extension.shared.settings.IntegerSetting;
import app.revanced.extension.shared.settings.StringSetting;
import app.revanced.extension.shared.utils.Logger;
import app.revanced.extension.shared.utils.ResourceUtils;
import app.revanced.extension.shared.utils.Utils;

View File

@ -47,7 +47,7 @@ public class SeekbarColorPatch {
/**
* Empty seekbar gradient, if hide seekbar in feed is enabled.
*/
private static final int[] HIDDEN_SEEKBAR_GRADIENT_COLORS = { 0x0, 0x0 };
private static final int[] HIDDEN_SEEKBAR_GRADIENT_COLORS = {0x0, 0x0};
/**
* Default YouTube seekbar color brightness.