From 7067ebdd128f525e039b3bd3942a4bdcf73c1980 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sun, 9 Jan 2022 16:53:36 +0100 Subject: [PATCH] Fixed imports --- .../newpipe/settings/preferencesearch/PreferenceParser.java | 4 +++- .../preferencesearch/PreferenceSearchConfiguration.java | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceParser.java b/app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceParser.java index 77136e08d..1f507c7f1 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceParser.java +++ b/app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceParser.java @@ -3,6 +3,7 @@ package org.schabi.newpipe.settings.preferencesearch; import android.content.Context; import android.text.TextUtils; import android.util.Log; + import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.XmlRes; @@ -14,7 +15,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.stream.Collectors; /** @@ -64,6 +64,8 @@ public class PreferenceParser { results.add(result); } if (searchConfiguration.getParserContainerElements().contains(xpp.getName())) { + // This code adds breadcrumbs for certain containers (e.g. PreferenceScreen) + // Example: Video and Audio > Player breadcrumbs.add(result.getTitle() == null ? "" : result.getTitle()); } } else if (xpp.getEventType() == XmlPullParser.END_TAG diff --git a/app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchConfiguration.java b/app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchConfiguration.java index 50371b78b..5835dcab5 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchConfiguration.java +++ b/app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchConfiguration.java @@ -1,14 +1,11 @@ package org.schabi.newpipe.settings.preferencesearch; -import android.text.TextUtils; - import androidx.preference.PreferenceCategory; import androidx.preference.PreferenceScreen; import java.util.Arrays; import java.util.List; import java.util.Objects; -import java.util.function.BinaryOperator; import java.util.stream.Stream; public class PreferenceSearchConfiguration {