move disable-shorts-player-pip to Experimental Flags

This commit is contained in:
inotia00 2023-01-31 16:09:39 +09:00
parent 318e990c60
commit 7ab81e90b9
5 changed files with 17 additions and 17 deletions

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.bytecode.fingerprints package app.revanced.patches.youtube.extended.shortspip.bytecode.fingerprints
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.bytecode.patch package app.revanced.patches.youtube.extended.shortspip.bytecode.patch
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
@ -12,11 +12,11 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.util.smali.ExternalLabel import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.youtube.layout.general.bytecode.fingerprints.DisableShortsPiPFingerprint import app.revanced.patches.youtube.extended.shortspip.bytecode.fingerprints.DisableShortsPiPFingerprint
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
import app.revanced.shared.annotation.YouTubeCompatibility import app.revanced.shared.annotation.YouTubeCompatibility
import app.revanced.shared.extensions.toErrorResult import app.revanced.shared.extensions.toErrorResult
import app.revanced.shared.util.integrations.Constants.GENERAL_LAYOUT import app.revanced.shared.util.integrations.Constants.EXTENDED_PATH
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@ -51,7 +51,7 @@ class DisableShortsPiPBytecodePatch : BytecodePatch(
method.addInstructions( method.addInstructions(
invokeIndex + 1,""" invokeIndex + 1,"""
invoke-static {}, $GENERAL_LAYOUT->disableShortsPlayerPiP()Z invoke-static {}, $EXTENDED_PATH/DisableShortsPiPPatch;->disableShortsPlayerPiP()Z
move-result v$registerA move-result v$registerA
if-eqz v$registerA, :pip if-eqz v$registerA, :pip
goto :disablepip goto :disablepip

View File

@ -1,4 +1,4 @@
package app.revanced.patches.youtube.layout.general.resource.patch package app.revanced.patches.youtube.extended.shortspip.resource.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
@ -9,7 +9,7 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patches.youtube.layout.general.bytecode.patch.DisableShortsPiPBytecodePatch import app.revanced.patches.youtube.extended.shortspip.bytecode.patch.DisableShortsPiPBytecodePatch
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsPatch
import app.revanced.shared.annotation.YouTubeCompatibility import app.revanced.shared.annotation.YouTubeCompatibility
import app.revanced.shared.util.resources.ResourceHelper import app.revanced.shared.util.resources.ResourceHelper
@ -31,13 +31,11 @@ class DisableShortsPiPPatch : ResourcePatch {
/* /*
add settings add settings
*/ */
ResourceHelper.addSettings4( ResourceHelper.addSettings2(
context, context,
"PREFERENCE_CATEGORY: REVANCED_SETTINGS", "PREFERENCE_CATEGORY: REVANCED_EXTENDED_SETTINGS",
"PREFERENCE: LAYOUT_SETTINGS", "PREFERENCE: EXTENDED_SETTINGS",
"PREFERENCE_HEADER: GENERAL", "SETTINGS: EXPERIMENTAL_FLAGS",
"SETTINGS: SHORTS_COMPONENT.PARENT",
"SETTINGS: SHORTS_COMPONENT_PARENT.B",
"SETTINGS: DISABLE_SHORTS_PLAYER_PIP" "SETTINGS: DISABLE_SHORTS_PLAYER_PIP"
) )

View File

@ -464,6 +464,9 @@ Are you sure you want to continue though?"</string>
<string name="revanced_reboot_warning_oldlayout">"Tricks the YouTube client version to v17.28.35 to load the old layout <string name="revanced_reboot_warning_oldlayout">"Tricks the YouTube client version to v17.28.35 to load the old layout
In the app settings, the YouTube version may be marked as v17.28.35"</string> In the app settings, the YouTube version may be marked as v17.28.35"</string>
<string name="revanced_reboot_warning_pip">"Disable pip mode on shorts players
This option is not valid on certain Android versions or certain OS"</string>
<string name="revanced_reboot_warning_phone">"Tricks the dpi to change some layouts to phone layouts. <string name="revanced_reboot_warning_phone">"Tricks the dpi to change some layouts to phone layouts.
If you enable this setting, the following features are available: If you enable this setting, the following features are available:

View File

@ -106,9 +106,6 @@
<!-- SETTINGS: SHORTS_COMPONENT_PARENT.B <!-- SETTINGS: SHORTS_COMPONENT_PARENT.B
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_hide_shorts_player_component_title" />SETTINGS: SHORTS_COMPONENT_PARENT.B --> <Preference android:title=" " android:selectable="false" android:summary="@string/revanced_hide_shorts_player_component_title" />SETTINGS: SHORTS_COMPONENT_PARENT.B -->
<!-- SETTINGS: DISABLE_SHORTS_PLAYER_PIP
<SwitchPreference android:title="@string/revanced_disable_shorts_player_pip_title" android:key="revanced_disable_shorts_player_pip" android:defaultValue="false" android:summaryOn="@string/revanced_disable_shorts_player_pip_summary_on" android:summaryOff="@string/revanced_disable_shorts_player_pip_summary_off" />SETTINGS: DISABLE_SHORTS_PLAYER_PIP -->
<!-- SETTINGS: HIDE_STARTUP_SHORTS_PLAYER <!-- SETTINGS: HIDE_STARTUP_SHORTS_PLAYER
<SwitchPreference android:title="@string/revanced_hide_startup_shorts_player_title" android:key="revanced_hide_startup_shorts_player" android:defaultValue="true" android:summaryOn="@string/revanced_hide_startup_shorts_player_summary_on" android:summaryOff="@string/revanced_hide_startup_shorts_player_summary_off" />SETTINGS: HIDE_STARTUP_SHORTS_PLAYER --> <SwitchPreference android:title="@string/revanced_hide_startup_shorts_player_title" android:key="revanced_hide_startup_shorts_player" android:defaultValue="true" android:summaryOn="@string/revanced_hide_startup_shorts_player_summary_on" android:summaryOff="@string/revanced_hide_startup_shorts_player_summary_off" />SETTINGS: HIDE_STARTUP_SHORTS_PLAYER -->
@ -345,6 +342,8 @@
<SwitchPreference android:title="@string/revanced_enable_phone_layout_title" android:key="revanced_enable_phone_layout" android:summary="@string/revanced_enable_phone_layout_summary" android:defaultValue="false" />SETTINGS: LAYOUT_SWITCH --> <SwitchPreference android:title="@string/revanced_enable_phone_layout_title" android:key="revanced_enable_phone_layout" android:summary="@string/revanced_enable_phone_layout_summary" android:defaultValue="false" />SETTINGS: LAYOUT_SWITCH -->
<!-- SETTINGS: ENABLE_VP9_CODEC <!-- SETTINGS: ENABLE_VP9_CODEC
<SwitchPreference android:title="@string/revanced_enable_vp9_codec_title" android:key="revanced_enable_vp9_codec" android:defaultValue="false" android:summary="@string/revanced_enable_vp9_codec_summary" />SETTINGS: ENABLE_VP9_CODEC --> <SwitchPreference android:title="@string/revanced_enable_vp9_codec_title" android:key="revanced_enable_vp9_codec" android:defaultValue="false" android:summary="@string/revanced_enable_vp9_codec_summary" />SETTINGS: ENABLE_VP9_CODEC -->
<!-- SETTINGS: DISABLE_SHORTS_PLAYER_PIP
<SwitchPreference android:title="@string/revanced_disable_shorts_player_pip_title" android:key="revanced_disable_shorts_player_pip" android:defaultValue="false" android:summaryOn="@string/revanced_disable_shorts_player_pip_summary_on" android:summaryOff="@string/revanced_disable_shorts_player_pip_summary_off" />SETTINGS: DISABLE_SHORTS_PLAYER_PIP -->
<!-- SETTINGS: ABOUT <!-- SETTINGS: ABOUT
<Preference android:title=" " android:selectable="false" android:summary="@string/pref_about_category" /> <Preference android:title=" " android:selectable="false" android:summary="@string/pref_about_category" />
@ -366,7 +365,6 @@
<Preference android:title="hide-shorts-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/> <Preference android:title="hide-shorts-button" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="hide-shorts-component" android:summary="@string/revanced_patches_excluded" android:selectable="false"/> <Preference android:title="hide-shorts-component" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="hide-startup-shorts-player" android:summary="@string/revanced_patches_excluded" android:selectable="false"/> <Preference android:title="hide-startup-shorts-player" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="disable-shorts-player-pip" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="enable-wide-searchbar" android:summary="@string/revanced_patches_excluded" android:selectable="false"/> <Preference android:title="enable-wide-searchbar" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="enable-tablet-miniplayer" android:summary="@string/revanced_patches_excluded" android:selectable="false"/> <Preference android:title="enable-tablet-miniplayer" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="hide-auto-captions" android:summary="@string/revanced_patches_excluded" android:selectable="false"/> <Preference android:title="hide-auto-captions" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
@ -425,6 +423,7 @@
<Preference android:title="enable-old-layout" android:summary="@string/revanced_patches_excluded" android:selectable="false"/> <Preference android:title="enable-old-layout" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="layout-switch" android:summary="@string/revanced_patches_excluded" android:selectable="false"/> <Preference android:title="layout-switch" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="force-vp9-codec" android:summary="@string/revanced_patches_excluded" android:selectable="false"/> <Preference android:title="force-vp9-codec" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title="disable-shorts-player-pip" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>
<Preference android:title=" " android:selectable="false" android:summary="@string/revanced_others_title" /> <Preference android:title=" " android:selectable="false" android:summary="@string/revanced_others_title" />
<Preference android:title="return-youtube-dislike" android:summary="@string/revanced_patches_excluded" android:selectable="false"/> <Preference android:title="return-youtube-dislike" android:summary="@string/revanced_patches_excluded" android:selectable="false"/>