mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-03 16:14:28 +02:00
feat(Inclusive span): Print logs only when Enable debug buffer logging
is enabled
This commit is contained in:
parent
e0a977e73c
commit
54c9e03abb
@ -14,7 +14,6 @@ import androidx.annotation.NonNull;
|
||||
import java.util.List;
|
||||
|
||||
import app.revanced.extension.shared.settings.BaseSettings;
|
||||
import app.revanced.extension.shared.settings.BooleanSetting;
|
||||
import app.revanced.extension.shared.utils.Logger;
|
||||
import app.revanced.extension.shared.utils.StringTrieSearch;
|
||||
|
||||
@ -27,7 +26,6 @@ final class DummyFilter extends Filter {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final class InclusiveSpanPatch {
|
||||
private static final BooleanSetting ENABLE_DEBUG_LOGGING = BaseSettings.ENABLE_DEBUG_LOGGING;
|
||||
|
||||
/**
|
||||
* Simple wrapper to pass the litho parameters through the prefix search.
|
||||
@ -126,7 +124,7 @@ public final class InclusiveSpanPatch {
|
||||
filterUsingCallbacks(filter, filter.callbacks);
|
||||
}
|
||||
|
||||
if (ENABLE_DEBUG_LOGGING.get()) {
|
||||
if (BaseSettings.ENABLE_DEBUG_BUFFER_LOGGING.get()) {
|
||||
Logger.printDebug(() -> "Using: "
|
||||
+ searchTree.numberOfPatterns() + " conversion context filters"
|
||||
+ " (" + searchTree.getEstimatedMemorySize() + " KB)");
|
||||
@ -171,7 +169,7 @@ public final class InclusiveSpanPatch {
|
||||
LithoFilterParameters parameter =
|
||||
new LithoFilterParameters(conversionContext, spannableString, span, start, end, flags);
|
||||
|
||||
if (ENABLE_DEBUG_LOGGING.get()) {
|
||||
if (BaseSettings.ENABLE_DEBUG_BUFFER_LOGGING.get()) {
|
||||
Logger.printDebug(() -> "Searching...\n\u200B\n" + parameter);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user