mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 05:07:41 +02:00
chore: lint code
This commit is contained in:
@ -6,6 +6,7 @@ import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.booleanPat
|
||||
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
||||
import app.revanced.patches.music.utils.compatibility.Constants.COMPATIBLE_PACKAGE
|
||||
import app.revanced.util.ResourceGroup
|
||||
import app.revanced.util.Utils.trimIndentMultiline
|
||||
import app.revanced.util.copyResources
|
||||
import app.revanced.util.patch.BaseResourcePatch
|
||||
import java.io.File
|
||||
@ -107,10 +108,7 @@ object CustomBrandingIconPatch : BaseResourcePatch(
|
||||
Each of these folders must contain the following files:
|
||||
|
||||
${launcherIconResourceFileNames.joinToString("\n") { "- $it" }}
|
||||
"""
|
||||
.split("\n")
|
||||
.joinToString("\n") { it.trimIndent() } // Remove the leading whitespace from each line.
|
||||
.trimIndent(), // Remove the leading newline.
|
||||
""".trimIndentMultiline(),
|
||||
)
|
||||
|
||||
private val ChangeHeader by booleanPatchOption(
|
||||
|
@ -13,10 +13,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.Reference
|
||||
|
||||
@Deprecated(
|
||||
"This patch is generally not required for the latest versions of YouTube and YouTube Music." +
|
||||
"For YouTube Music, if user spoofs the app version to v4.27.53, mp4a codec is still used, this is the patch for some of these users."
|
||||
)
|
||||
/**
|
||||
* This patch is generally not required for the latest versions of YouTube and YouTube Music.
|
||||
* For YouTube Music, if user spoofs the app version to v4.27.53, mp4a codec is still used, this is the patch for some of these users.
|
||||
*/
|
||||
abstract class BaseOpusCodecsPatch(
|
||||
private val descriptor: String
|
||||
) : BytecodePatch(
|
||||
|
@ -8,6 +8,7 @@ import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PAC
|
||||
import app.revanced.patches.youtube.utils.settings.ResourceUtils.updatePatchStatusIcon
|
||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||
import app.revanced.util.ResourceGroup
|
||||
import app.revanced.util.Utils.trimIndentMultiline
|
||||
import app.revanced.util.copyResources
|
||||
import app.revanced.util.copyXmlNode
|
||||
import app.revanced.util.patch.BaseResourcePatch
|
||||
@ -111,10 +112,7 @@ object CustomBrandingIconPatch : BaseResourcePatch(
|
||||
Each of these folders must contain the following files:
|
||||
|
||||
${launcherIconResourceFileNames.joinToString("\n") { "- $it" }}
|
||||
"""
|
||||
.split("\n")
|
||||
.joinToString("\n") { it.trimIndent() } // Remove the leading whitespace from each line.
|
||||
.trimIndent(), // Remove the leading newline.
|
||||
""".trimIndentMultiline(),
|
||||
)
|
||||
|
||||
private val ChangeHeader by booleanPatchOption(
|
||||
|
8
src/main/kotlin/app/revanced/util/Utils.kt
Normal file
8
src/main/kotlin/app/revanced/util/Utils.kt
Normal file
@ -0,0 +1,8 @@
|
||||
package app.revanced.util
|
||||
|
||||
internal object Utils {
|
||||
internal fun String.trimIndentMultiline() =
|
||||
this.split("\n")
|
||||
.joinToString("\n") { it.trimIndent() } // Remove the leading whitespace from each line.
|
||||
.trimIndent() // Remove the leading newline.
|
||||
}
|
Reference in New Issue
Block a user