mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-09 11:04:36 +02:00
fix(YouTube/Hide suggested video overlay): click sound is continuously played when minimized after the video ends
This commit is contained in:
parent
ebcadd5c6f
commit
988e8e3ea7
@ -12,7 +12,6 @@ import app.revanced.patches.youtube.player.suggestedvideooverlay.fingerprints.Co
|
|||||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
|
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.CoreContainer
|
import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.CoreContainer
|
||||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.youtube.utils.videoid.general.VideoIdPatch
|
|
||||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||||
import app.revanced.util.integrations.Constants.PLAYER
|
import app.revanced.util.integrations.Constants.PLAYER
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
@ -23,8 +22,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
|||||||
description = "Hide the suggested video overlay to play next.",
|
description = "Hide the suggested video overlay to play next.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class,
|
SharedResourceIdPatch::class
|
||||||
VideoIdPatch::class
|
|
||||||
],
|
],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
@ -73,13 +71,6 @@ object SuggestedVideoOverlayPatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
} ?: throw CoreConatinerBuilderFingerprint.exception
|
} ?: throw CoreConatinerBuilderFingerprint.exception
|
||||||
|
|
||||||
VideoIdPatch.videoEndMethod.apply {
|
|
||||||
addInstruction(
|
|
||||||
implementation!!.instructions.size - 1,
|
|
||||||
"invoke-static {},$PLAYER->hideSuggestedVideoOverlay()V"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add settings
|
* Add settings
|
||||||
*/
|
*/
|
||||||
@ -94,7 +85,4 @@ object SuggestedVideoOverlayPatch : BytecodePatch(
|
|||||||
SettingsPatch.updatePatchStatus("Hide suggested video overlay")
|
SettingsPatch.updatePatchStatus("Hide suggested video overlay")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
|
||||||
"$PLAYER->hideSuggestedVideoOverlay(Landroid/view/ViewGroup;)V"
|
|
||||||
}
|
}
|
@ -67,7 +67,7 @@ object VideoIdPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
it.mutableClass.methods.add(seekHelperMethod)
|
it.mutableClass.methods.add(seekHelperMethod)
|
||||||
|
|
||||||
videoEndMethod = context.toMethodWalker(it.method)
|
val videoEndMethod = context.toMethodWalker(it.method)
|
||||||
.nextMethod(it.scanResult.patternScanResult!!.startIndex + 1, true)
|
.nextMethod(it.scanResult.patternScanResult!!.startIndex + 1, true)
|
||||||
.getMethod() as MutableMethod
|
.getMethod() as MutableMethod
|
||||||
|
|
||||||
@ -145,7 +145,6 @@ object VideoIdPatch : BytecodePatch(
|
|||||||
private lateinit var insertMethod: MutableMethod
|
private lateinit var insertMethod: MutableMethod
|
||||||
private lateinit var playerInitMethod: MutableMethod
|
private lateinit var playerInitMethod: MutableMethod
|
||||||
private lateinit var timeMethod: MutableMethod
|
private lateinit var timeMethod: MutableMethod
|
||||||
internal lateinit var videoEndMethod: MutableMethod
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds an invoke-static instruction, called with the new id when the video changes
|
* Adds an invoke-static instruction, called with the new id when the video changes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user