fix: make minimized-playback-manager-fingerprint unique (#120)

This commit is contained in:
bogadana 2022-07-05 22:23:00 +02:00 committed by GitHub
parent a40af7026b
commit cd5e911f4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View File

@ -29,12 +29,9 @@ object MinimizedPlaybackSettingsFingerprint : MethodFingerprint(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.IF_NEZ,
Opcode.GOTO,
Opcode.IGET_OBJECT,
Opcode.CHECK_CAST
),
customFingerprint = {
it.implementation!!.instructions.any {
(it as? WideLiteralInstruction)?.wideLiteral == resourceId
}
}
)
val resourceId = ResourceIdMappingProviderResourcePatch.resourceMappings.first { it.type == "string" && it.name == "pref_background_category" }.id

View File

@ -8,7 +8,6 @@ import app.revanced.patcher.data.impl.toMethodWalker
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Dependencies
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.impl.BytecodePatch
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
@ -21,7 +20,6 @@ import org.jf.dexlib2.iface.reference.MethodReference
@Patch
@Dependencies(dependencies = [ResourceIdMappingProviderResourcePatch::class])
@Name("minimized-playback")
@Description("Enable minimized and background playback.")
@MinimizedPlaybackCompatibility