diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/utils/settings/SettingsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/utils/settings/SettingsPatch.kt index e1bcc7c8c..13e59bb69 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/utils/settings/SettingsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/utils/settings/SettingsPatch.kt @@ -29,6 +29,7 @@ import app.revanced.util.removeStringsElements import app.revanced.util.valueOrThrow import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction import org.w3c.dom.Element +import java.nio.file.Files import java.util.jar.Manifest private const val EXTENSION_INITIALIZATION_CLASS_DESCRIPTOR = @@ -182,6 +183,18 @@ val settingsPatch = resourcePatch( copyXmlNode("youtube/settings/host", "values/$xmlFile", "resources") } + val valuesV21Directory = get("res").resolve("values-v21") + if (!valuesV21Directory.isDirectory) + Files.createDirectories(valuesV21Directory.toPath()) + + copyResources( + "youtube/settings", + ResourceGroup( + "values-v21", + "strings.xml" + ) + ) + arrayOf( ResourceGroup( "drawable", diff --git a/patches/src/main/resources/youtube/settings/values-v21/strings.xml b/patches/src/main/resources/youtube/settings/values-v21/strings.xml new file mode 100644 index 000000000..6fe87a4c3 --- /dev/null +++ b/patches/src/main/resources/youtube/settings/values-v21/strings.xml @@ -0,0 +1,7 @@ + + + + @string/revanced_spoof_streaming_data_side_effects_android + @string/revanced_spoof_streaming_data_side_effects_android + @string/revanced_spoof_streaming_data_side_effects_android +