feat(Spotify): Add Change lyrics provider
patch (#4937)
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
package app.revanced.extension.spotify.shared;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import app.revanced.extension.shared.Logger;
|
||||
import app.revanced.extension.shared.Utils;
|
||||
|
||||
public final class ComponentFilters {
|
||||
|
||||
public interface ComponentFilter {
|
||||
@NonNull
|
||||
String getFilterValue();
|
||||
String getFilterRepresentation();
|
||||
default boolean filterUnavailable() {
|
||||
@ -20,7 +23,8 @@ public final class ComponentFilters {
|
||||
// Android resources are always positive, so -1 is a valid sentinel value to indicate it has not been loaded.
|
||||
// 0 is returned when a resource has not been found.
|
||||
private int resourceId = -1;
|
||||
private String stringfiedResourceId = null;
|
||||
@Nullable
|
||||
private String stringfiedResourceId;
|
||||
|
||||
public ResourceIdComponentFilter(String resourceName, String resourceType) {
|
||||
this.resourceName = resourceName;
|
||||
@ -34,6 +38,7 @@ public final class ComponentFilters {
|
||||
return resourceId;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getFilterValue() {
|
||||
if (stringfiedResourceId == null) {
|
||||
@ -66,6 +71,7 @@ public final class ComponentFilters {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getFilterValue() {
|
||||
return string;
|
||||
|
Reference in New Issue
Block a user