mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 05:37:40 +02:00
feat(YouTube): Disable update screen
patch has been integrated into Hide layout components
patch
This commit is contained in:
@ -12,6 +12,7 @@ import app.revanced.patches.youtube.general.components.fingerprints.AccountListF
|
|||||||
import app.revanced.patches.youtube.general.components.fingerprints.AccountListParentFingerprint
|
import app.revanced.patches.youtube.general.components.fingerprints.AccountListParentFingerprint
|
||||||
import app.revanced.patches.youtube.general.components.fingerprints.AccountMenuFingerprint
|
import app.revanced.patches.youtube.general.components.fingerprints.AccountMenuFingerprint
|
||||||
import app.revanced.patches.youtube.general.components.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
import app.revanced.patches.youtube.general.components.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
||||||
|
import app.revanced.patches.youtube.general.components.fingerprints.AppBlockingCheckResultToStringFingerprint
|
||||||
import app.revanced.patches.youtube.general.components.fingerprints.BottomUiContainerFingerprint
|
import app.revanced.patches.youtube.general.components.fingerprints.BottomUiContainerFingerprint
|
||||||
import app.revanced.patches.youtube.general.components.fingerprints.FloatingMicrophoneFingerprint
|
import app.revanced.patches.youtube.general.components.fingerprints.FloatingMicrophoneFingerprint
|
||||||
import app.revanced.patches.youtube.general.components.fingerprints.PiPNotificationFingerprint
|
import app.revanced.patches.youtube.general.components.fingerprints.PiPNotificationFingerprint
|
||||||
@ -36,6 +37,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||||
|
import com.android.tools.smali.dexlib2.util.MethodUtil
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object LayoutComponentsPatch : BaseBytecodePatch(
|
object LayoutComponentsPatch : BaseBytecodePatch(
|
||||||
@ -52,6 +54,7 @@ object LayoutComponentsPatch : BaseBytecodePatch(
|
|||||||
AccountListParentFingerprint,
|
AccountListParentFingerprint,
|
||||||
AccountMenuParentFingerprint,
|
AccountMenuParentFingerprint,
|
||||||
AccountSwitcherAccessibilityLabelFingerprint,
|
AccountSwitcherAccessibilityLabelFingerprint,
|
||||||
|
AppBlockingCheckResultToStringFingerprint,
|
||||||
BottomUiContainerFingerprint,
|
BottomUiContainerFingerprint,
|
||||||
FloatingMicrophoneFingerprint,
|
FloatingMicrophoneFingerprint,
|
||||||
PiPNotificationFingerprint,
|
PiPNotificationFingerprint,
|
||||||
@ -94,6 +97,18 @@ object LayoutComponentsPatch : BaseBytecodePatch(
|
|||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
|
// region patch for disable update screen
|
||||||
|
|
||||||
|
AppBlockingCheckResultToStringFingerprint.resultOrThrow().mutableClass.methods.first { method ->
|
||||||
|
MethodUtil.isConstructor(method)
|
||||||
|
&& method.parameters == listOf("Landroid/content/Intent;", "Z")
|
||||||
|
}.addInstructions(
|
||||||
|
1,
|
||||||
|
"const/4 p1, 0x0"
|
||||||
|
)
|
||||||
|
|
||||||
|
// endregion
|
||||||
|
|
||||||
// region patch for hide account menu
|
// region patch for hide account menu
|
||||||
|
|
||||||
// for you tab
|
// for you tab
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package app.revanced.patches.youtube.misc.updatescreen.fingerprints
|
package app.revanced.patches.youtube.general.components.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.updatescreen
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patches.youtube.misc.updatescreen.fingerprints.AppBlockingCheckResultToStringFingerprint
|
|
||||||
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
|
|
||||||
import app.revanced.patches.youtube.utils.settings.SettingsPatch
|
|
||||||
import app.revanced.util.patch.BaseBytecodePatch
|
|
||||||
import app.revanced.util.resultOrThrow
|
|
||||||
import com.android.tools.smali.dexlib2.util.MethodUtil
|
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
object UpdateScreenPatch : BaseBytecodePatch(
|
|
||||||
name = "Disable update screen",
|
|
||||||
description = "Disable the \"Update your app\" screen that appears when using an outdated client.",
|
|
||||||
dependencies = setOf(SettingsPatch::class),
|
|
||||||
compatiblePackages = COMPATIBLE_PACKAGE,
|
|
||||||
fingerprints = setOf(AppBlockingCheckResultToStringFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
AppBlockingCheckResultToStringFingerprint.resultOrThrow().mutableClass.methods.first { method ->
|
|
||||||
MethodUtil.isConstructor(method)
|
|
||||||
&& method.parameters == listOf("Landroid/content/Intent;", "Z")
|
|
||||||
}.addInstructions(
|
|
||||||
1,
|
|
||||||
"const/4 p1, 0x0"
|
|
||||||
)
|
|
||||||
|
|
||||||
SettingsPatch.updatePatchStatus(this)
|
|
||||||
}
|
|
||||||
}
|
|
@ -610,7 +610,6 @@
|
|||||||
|
|
||||||
<PreferenceCategory android:title="@string/revanced_preference_screen_misc_title" android:layout="@layout/revanced_settings_preferences_category">
|
<PreferenceCategory android:title="@string/revanced_preference_screen_misc_title" android:layout="@layout/revanced_settings_preferences_category">
|
||||||
<Preference android:title="Disable QUIC protocol" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
<Preference android:title="Disable QUIC protocol" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||||
<Preference android:title="Disable update screen" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
|
||||||
<Preference android:title="Enable debug logging" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
<Preference android:title="Enable debug logging" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||||
<Preference android:title="Enable external browser" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
<Preference android:title="Enable external browser" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||||
<Preference android:title="Enable minimized playback" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
<Preference android:title="Enable minimized playback" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
|
||||||
|
Reference in New Issue
Block a user