mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-09 11:04:36 +02:00
fix(youtube/disable-haptic-feedback): force close occurs in YouTube v18.27.36
This commit is contained in:
parent
10068b16e5
commit
3f8b29ed40
@ -19,6 +19,7 @@ import app.revanced.patches.youtube.player.hapticfeedback.fingerprints.ZoomHapti
|
||||
import app.revanced.patches.youtube.utils.annotations.YouTubeCompatibility
|
||||
import app.revanced.patches.youtube.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.integrations.Constants.PLAYER
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@ -65,7 +66,9 @@ class HapticFeedBackPatch : BytecodePatch(
|
||||
var register = 0
|
||||
|
||||
if (this.name == "run") {
|
||||
index = it.scanResult.patternScanResult!!.startIndex
|
||||
index = implementation!!.instructions.indexOfFirst { instruction ->
|
||||
instruction.opcode == Opcode.SGET
|
||||
}
|
||||
register = getInstruction<OneRegisterInstruction>(index).registerA
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user