From 0e229a46cb5b8b74183c47a6eae08d667f941406 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 31 Jul 2022 12:15:26 +0200 Subject: [PATCH] feat: `settings` patch --- .../bytecode/SwipeControlsBytecodePatch.kt | 2 +- .../widesearchbar/patch/WideSearchbarPatch.kt | 2 +- .../misc/autorepeat/patch/AutoRepeatPatch.kt | 2 +- .../misc/forcevp9/patch/ForceVP9CodecPatch.kt | 2 +- .../hdrbrightness/patch/HDRBrightnessPatch.kt | 2 +- .../patch/resource/MicroGResourcePatch.kt | 11 +- .../annotations/SettingsCompatibility.kt | 13 + .../LicenseActivityFingerprint.kt | 28 +++ .../ReVancedSettingsActivityFingerprint.kt | 28 +++ .../settings/bytecode/patch/SettingsPatch.kt | 56 +++++ .../resource/patch/SettingsResourcePatch.kt | 60 +++++ .../resources/settings/host/values/arrays.xml | 14 ++ .../settings/host/values/strings.xml | 227 ++++++++++++++++++ .../settings/host/xml/settings_fragment.xml | 12 + .../settings/layout/xsettings_toolbar.xml | 4 + .../layout/xsettings_with_toolbar.xml | 4 + .../layout/xsettings_with_toolbar_layout.xml | 5 + .../resources/settings/xml/revanced_prefs.xml | 180 ++++++++++++++ .../resources/sponsorblock/values/strings.xml | 5 +- 19 files changed, 646 insertions(+), 11 deletions(-) create mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/settings/annotations/SettingsCompatibility.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/LicenseActivityFingerprint.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/ReVancedSettingsActivityFingerprint.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsResourcePatch.kt create mode 100644 src/main/resources/settings/host/values/arrays.xml create mode 100644 src/main/resources/settings/host/values/strings.xml create mode 100644 src/main/resources/settings/host/xml/settings_fragment.xml create mode 100644 src/main/resources/settings/layout/xsettings_toolbar.xml create mode 100644 src/main/resources/settings/layout/xsettings_with_toolbar.xml create mode 100644 src/main/resources/settings/layout/xsettings_with_toolbar_layout.xml create mode 100644 src/main/resources/settings/xml/revanced_prefs.xml diff --git a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt index 48b604da..03cb0620 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/interaction/swipecontrols/patch/bytecode/SwipeControlsBytecodePatch.kt @@ -17,7 +17,7 @@ import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.playeroverlay.patch.PlayerOverlaysHookPatch import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch -@Patch(include = false) +@Patch @Name("swipe-controls") @Description("Adds volume and brightness swipe controls.") @SwipeControlsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/widesearchbar/patch/WideSearchbarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/widesearchbar/patch/WideSearchbarPatch.kt index 40c51060..e1d4fe07 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/widesearchbar/patch/WideSearchbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/widesearchbar/patch/WideSearchbarPatch.kt @@ -20,7 +20,7 @@ import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.WideSearch import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.WideSearchbarTwoParentFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -@Patch(include = false) +@Patch @Dependencies([IntegrationsPatch::class]) @Name("enable-wide-searchbar") @Description("Replaces the search icon with a wide search bar. This will hide the YouTube logo when active.") diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt index e0f85d6b..ca964ad3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/autorepeat/patch/AutoRepeatPatch.kt @@ -18,7 +18,7 @@ import app.revanced.patches.youtube.misc.autorepeat.fingerprints.AutoRepeatFinge import app.revanced.patches.youtube.misc.autorepeat.fingerprints.AutoRepeatParentFingerprint import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch -@Patch(include = false) +@Patch @Dependencies([IntegrationsPatch::class]) @Name("always-autorepeat") @Description("Always repeats the playing video again.") diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/forcevp9/patch/ForceVP9CodecPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/forcevp9/patch/ForceVP9CodecPatch.kt index 1746e6f2..852522c1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/forcevp9/patch/ForceVP9CodecPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/forcevp9/patch/ForceVP9CodecPatch.kt @@ -22,7 +22,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.ReferenceInstruction import org.jf.dexlib2.iface.reference.FieldReference -@Patch(include = false) +@Patch @Dependencies([IntegrationsPatch::class]) @Name("force-vp9-codec") @Description("Forces the VP9 codec for videos.") diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch.kt index e6a530e8..b7de80b6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/hdrbrightness/patch/HDRBrightnessPatch.kt @@ -18,7 +18,7 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction import org.jf.dexlib2.iface.reference.FieldReference -@Patch(false) +@Patch @Name("hdr-auto-brightness") @Description("Makes the brightness of HDR videos follow the system default.") @HDRBrightnessCompatibility diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt index 60b79e98..cd57dea3 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/microg/patch/resource/MicroGResourcePatch.kt @@ -13,9 +13,10 @@ import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibi import app.revanced.patches.youtube.misc.microg.shared.Constants.BASE_MICROG_PACKAGE_NAME import app.revanced.patches.youtube.misc.microg.shared.Constants.REVANCED_APP_NAME import app.revanced.patches.youtube.misc.microg.shared.Constants.REVANCED_PACKAGE_NAME +import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsResourcePatch @Name("microg-resource-patch") -@Dependencies([FixLocaleConfigErrorPatch::class]) +@Dependencies([FixLocaleConfigErrorPatch::class, SettingsResourcePatch::class]) @Description("Resource patch to allow YouTube ReVanced to run without root and under a different package name.") @MicroGPatchCompatibility @Version("0.0.1") @@ -27,12 +28,18 @@ class MicroGResourcePatch : ResourcePatch() { settingsElementIntent.setAttribute("android:targetClass", "org.microg.gms.ui.SettingsActivity") val settingsElement = it.file.createElement("Preference") - settingsElement.setAttribute("android:title", "MicroG") + settingsElement.setAttribute("android:title", "@string/microg_settings") settingsElement.appendChild(settingsElementIntent) it.file.firstChild.appendChild(settingsElement) } + val settings_fragment = data.get("res/xml/settings_fragment.xml") + val text = settings_fragment.readText() + settings_fragment.writeText( + text.replace("android:targetPackage=\"com.google.android.youtube", "android:targetPackage=\"$REVANCED_PACKAGE_NAME") + ) + val manifest = data.get("AndroidManifest.xml").readText() data.get("AndroidManifest.xml").writeText( diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/annotations/SettingsCompatibility.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/annotations/SettingsCompatibility.kt new file mode 100644 index 00000000..cf15bd92 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/annotations/SettingsCompatibility.kt @@ -0,0 +1,13 @@ +package app.revanced.patches.youtube.misc.settings.annotations + +import app.revanced.patcher.annotation.Compatibility +import app.revanced.patcher.annotation.Package + +@Compatibility( + [Package( + "com.google.android.youtube", arrayOf() + )] +) +@Target(AnnotationTarget.CLASS) +@Retention(AnnotationRetention.RUNTIME) +internal annotation class SettingsCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/LicenseActivityFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/LicenseActivityFingerprint.kt new file mode 100644 index 00000000..b070760d --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/LicenseActivityFingerprint.kt @@ -0,0 +1,28 @@ +package app.revanced.patches.youtube.misc.settings.bytecode.fingerprints + +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.annotation.Version +import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod +import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import app.revanced.patches.youtube.layout.returnyoutubedislike.annotations.ReturnYouTubeDislikeCompatibility + +// TODO: This is more of a class fingerprint than a method fingerprint. +// Convert to a class fingerprint whenever possible. +@Name("license-activity-fingerprint") +@MatchingMethod( + "Lcom/google/android/libraries/social/licenses/LicenseActivity;", "onCreate" +) +@FuzzyPatternScanMethod(2) +@ReturnYouTubeDislikeCompatibility +@Version("0.0.2") +object LicenseActivityFingerprint : MethodFingerprint( + null, + null, + null, + null, + null, + { methodDef -> + methodDef.definingClass.endsWith("LicenseActivity;") && methodDef.name == "onCreate" + } +) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/ReVancedSettingsActivityFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/ReVancedSettingsActivityFingerprint.kt new file mode 100644 index 00000000..b42dc05f --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/fingerprints/ReVancedSettingsActivityFingerprint.kt @@ -0,0 +1,28 @@ +package app.revanced.patches.youtube.misc.settings.bytecode.fingerprints + +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.annotation.Version +import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod +import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod +import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint +import app.revanced.patches.youtube.layout.returnyoutubedislike.annotations.ReturnYouTubeDislikeCompatibility + +// TODO: This is more of a class fingerprint than a method fingerprint. +// Convert to a class fingerprint whenever possible. +@Name("revanced-settings-activity-fingerprint") +@MatchingMethod( + "Lapp/revanced/integrations/settingsmenu/ReVancedSettingActivity;", "initializeSettings" +) +@FuzzyPatternScanMethod(2) +@ReturnYouTubeDislikeCompatibility +@Version("0.0.2") +object ReVancedSettingsActivityFingerprint : MethodFingerprint( + null, + null, + null, + null, + null, + { methodDef -> + methodDef.definingClass.endsWith("ReVancedSettingActivity;") && methodDef.name == "initializeSettings" + } +) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt new file mode 100644 index 00000000..6dae72bb --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/bytecode/patch/SettingsPatch.kt @@ -0,0 +1,56 @@ +package app.revanced.patches.youtube.misc.settings.bytecode.patch + +import app.revanced.patcher.annotation.Description +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.annotation.Version +import app.revanced.patcher.data.impl.BytecodeData +import app.revanced.patcher.extensions.addInstruction +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.patches.youtube.misc.integrations.patch.IntegrationsPatch +import app.revanced.patches.youtube.misc.settings.annotations.SettingsCompatibility +import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.LicenseActivityFingerprint +import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ReVancedSettingsActivityFingerprint +import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsResourcePatch + +@Patch +@Dependencies([IntegrationsPatch::class, SettingsResourcePatch::class]) +@Name("settings") +@Description("Adds settings for ReVanced to YouTube.") +@SettingsCompatibility +@Version("0.0.1") +class SettingsPatch : BytecodePatch( + listOf(LicenseActivityFingerprint, ReVancedSettingsActivityFingerprint) +) { + override fun execute(data: BytecodeData): PatchResult { + val licenseActivityResult = LicenseActivityFingerprint.result!! + val settingsResult = ReVancedSettingsActivityFingerprint.result!! + + val licenseActivityClass = licenseActivityResult.mutableClass + val settingsClass = settingsResult.mutableClass + + val onCreate = licenseActivityResult.mutableMethod + val setThemeMethodName = "setTheme" + val initializeSettings = settingsResult.mutableMethod + + // First add the setTheme call to the onCreate method to not affect the offsets. + onCreate.addInstructions( + 1, + """ + invoke-static { p0 }, ${settingsClass.type}->${initializeSettings.name}(${licenseActivityClass.type})V + return-void + """ + ) + + // Add the initializeSettings call to the onCreate method. + onCreate.addInstruction( + 0, + "invoke-static { p0 }, ${settingsClass.type}->$setThemeMethodName(${licenseActivityClass.type})V" + ) + return PatchResultSuccess() + } +} \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsResourcePatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsResourcePatch.kt new file mode 100644 index 00000000..fa4c248d --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/resource/patch/SettingsResourcePatch.kt @@ -0,0 +1,60 @@ +package app.revanced.patches.youtube.misc.settings.resource.patch + +import app.revanced.patcher.annotation.Name +import app.revanced.patcher.annotation.Version +import app.revanced.patcher.data.impl.ResourceData +import app.revanced.patcher.patch.PatchResult +import app.revanced.patcher.patch.PatchResultSuccess +import app.revanced.patcher.patch.annotations.Dependencies +import app.revanced.patcher.patch.impl.ResourcePatch +import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch +import app.revanced.patches.youtube.misc.settings.annotations.SettingsCompatibility +import app.revanced.util.resources.ResourceUtils +import app.revanced.util.resources.ResourceUtils.copyResources +import app.revanced.util.resources.ResourceUtils.copyXmlNode + +@Name("settings-resource-patch") +@SettingsCompatibility +@Dependencies([FixLocaleConfigErrorPatch::class]) +@Version("0.0.1") +class SettingsResourcePatch : ResourcePatch() { + override fun execute(data: ResourceData): PatchResult { + /* + * Copy strings + */ + + data.copyXmlNode("settings/host", "values/strings.xml", "resources") + + /* + * Copy arrays + */ + + data.copyXmlNode("settings/host", "values/arrays.xml", "resources") + + /* + * Copy preference fragments + */ + + data.copyXmlNode("settings/host", "xml/settings_fragment.xml", "PreferenceScreen") + + /* + * Copy layout resources + */ + arrayOf( + ResourceUtils.ResourceGroup( + "layout", + "xsettings_toolbar.xml", + "xsettings_with_toolbar.xml", + "xsettings_with_toolbar_layout.xml" + ), + ResourceUtils.ResourceGroup( + "xml", + "revanced_prefs.xml" + ) + ).forEach { resourceGroup -> + data.copyResources("settings", resourceGroup) + } + + return PatchResultSuccess() + } +} \ No newline at end of file diff --git a/src/main/resources/settings/host/values/arrays.xml b/src/main/resources/settings/host/values/arrays.xml new file mode 100644 index 00000000..2e9447df --- /dev/null +++ b/src/main/resources/settings/host/values/arrays.xml @@ -0,0 +1,14 @@ + + + @string/revanced_button_location_entry_none + @string/revanced_button_location_entry_player + @string/revanced_button_location_entry_buttoncontainer + @string/revanced_button_location_entry_both + + + NONE + PLAYER + BUTTON_CONTAINER + BOTH + + \ No newline at end of file diff --git a/src/main/resources/settings/host/values/strings.xml b/src/main/resources/settings/host/values/strings.xml new file mode 100644 index 00000000..4e95d3a5 --- /dev/null +++ b/src/main/resources/settings/host/values/strings.xml @@ -0,0 +1,227 @@ + + + "Doesn't show auto-repeat button in the player overlay. Use the toggle below to control auto-repeat" + Auto-repeat button is shown in the player overlay + Auto-repeat button + Always Auto-repeat is off + Always Auto-repeat is on + Always Auto-repeat + Video watermark is hidden + Video watermark is shown + Video watermark + Buffer settings + Cast button is hidden + Cast button is shown + Cast button + Autoplay button is hidden + Autoplay button is shown + Autoplay button + Codec override + Extra debug logging is disabled + Extra Debug logging is enabled + Debug mode + Tap to join ReVanced on Discord + Discord server + Video brightness will follow your device\'s brightness on HDR landscape videos + Video brightness is set to max on HDR landscape videos + Override HDR Video Brightness + Info cards are hidden + Info cards are shown + Info cards + Layout settings + "The maximum duration of media that the player will attempt to buffer (in milliseconds) + + Default: 120000" + Maximum buffer + Miscellaneous + "The duration of media that must be buffered for playback to start or resume following a user action such as seeking (in milliseconds) + + Default: 2500" + Playback start + Select preferred video speed + Preferred video speed + "The duration of media that must be buffered for playback to resume after a rebuffer (in milliseconds). A rebuffer is defined to be caused by buffer depletion rather than a user action + + Default: 5000" + Rebuffer + End screens are hidden + End screens are shown + End screens + Support links + Support + Video settings + Tap to force usage of the VP9 codec + VP9 codec not forced + VP9 codec is enabled by default for supported devices, disable if you encounter stuttering/slowness in videos + VP9 codec + Wide search bar + Search bar style is defined by the app + Forcing wide search bar + Show shorts button + Shorts button is hidden + Shorts button is shown + Fullscreen panels + Fullscreen panels are hidden + Fullscreen panels are shown + Dynamic player + Dynamic player is defined automatically + Dynamic player is forced on square and vertical videos + Captions aren\'t enabled automatically at 0% volume + Captions are enabled automatically at 0% volume + Auto captions + Swipe controls for brightness are disabled + Swipe controls for brightness are enabled + Swipe controls for Brightness + Swipe controls for Brightness and Volume + Swipe controls + Swipe controls for volume are disabled + Swipe controls for volume are enabled + Swipe controls for Volume + Press-to-Swipe + Swipe controls are always active + Swipe controls require a long-press before activating + Vibrate on Press-to-Swipe + You\'ll get haptic feedback when activating Press-to-Swipe + You won\'t get haptic feedback when activating Press-to-Swipe + Overlay Timeout + How long the overlay is shown after changes (ms) + Overlay Text Size + Text size on the overlay + Overlay Background Transparency + Transparency value of the overlay background (0–255) + Swipe Magnitude Threshold + Minimum magnitude before a swipe is detected + Tablet style + Tablet style is turned on. For example suggested videos are only partially working + Tablet style is turned off + Tap to open our website + ReVanced website + Home ADS are hidden + Home ADS are shown + Home ADS + Video ADS + Video ADS are hidden + Video ADS are shown + Stories are hidden + Stories are shown + YouTube stories + AD settings + Tablet miniplayer is not being used + Tablet miniplayer is being used + Tablet miniplayer + + Comments removal + Comments removal is turned off (new comments / phones only) + Comments removal is turned on (new comments / phones only) + Community post removal + Community post removal is turned off + Community post removal is turned on + Compact banner removal + Compact banner removal is turned off + Compact banner removal is turned on + Compact movie removal + Compact movie removal is turned off + Compact movie removal is turned on + General layout ad removal + General layout ad removal is turned off + General layout ad removal is turned on + Movie shelf removal + Movie shelf removal is turned off + Movie shelf removal is turned on + Survey removal + Feed survey removal is turned off + Feed survey removal is turned on + Merchandise removal + Merchandise removal is turned off + Merchandise removal is turned on + Movie upsell removal + Movie upsell removal is turned off + Movie upsell removal is turned on + Emergency box removal + Emergency box removal is turned on + Emergency box removal is turned off + Info panel removal + Info panel removal is turned on + Info panel removal is turned off + Medical panel removal + Medical panel removal is turned on + Medical panel removal is turned off + Paid content removal + Paid content removal is turned on + Paid content removal is turned off + Suggested for you removal + Suggested for you removal is turned on + Suggested for you removal is turned off + General Suggestions removal + General Suggestions removal is turned on + General Suggestions removal is turned off + Latest posts removal + Latest posts removal is turned on + Latest posts removal is turned off + Channel guidelines removal + Channel guidelines removal is turned on + Channel guidelines removal is turned off + + Notification settings + "1. Google device registration and Cloud Messaging need to be enabled for notifications. + 2. ReVanced needs to be shown as registered under Cloud Messaging. + 3. Current State in Cloud Messaging must be Connected." + MicroG settings + ReVanced settings + + Seekbar Tapping + Seekbar Tapping (video progress bar) is disabled + Seekbar Tapping (video progress bar) is enabled + + Background playback + Background playback is disabled + Background playback is enabled + + Normal + + Shorts Shelf + Shorts Shelf removal is turned off + Shorts Shelf removal is turned on + + Create Button is hidden + Create Button is shown + Create Button + + Community Guidelines + Community Guidelines removal is turned off + Community Guidelines removal is turned on + + Copy Link Button is hidden from the player overlay + Copy Link Button is shown in the player overlay + Copy Link Button With Timestamp is hidden from the player overlay + Copy Link Button With Timestamp is shown in the player overlay + Copy Link Button With Timestamp + Copy Link Button + + Quality Settings style + Using default style video quality settings + Using old style video quality settings + + Video ad whitelisting + Video ad whitelisting is turned off + Video ad whitelisting is turned on. Use the ADS button under the player to whitelist a channel + ADS + SponsorBlock + Channel %s was added to the %s whitelist + Channel %s was removed from the %s whitelist + Failed to add channel %s to the %s whitelist + Failed to remove channel %s from the %s whitelist + Failed to retrieve channel details, received code %d + Hidden + In player + Under player + Both + Return YouTube Dislike settings + Uses the RYD API + SponsorBlock settings + Uses the sponsor.ajay.app API + Enable RYD + Switch this on to see the dislike counts again + Return YouTube Dislike Integration + This integration uses the RYD API from https://returnyoutubedislike.com. Tap to learn more + \ No newline at end of file diff --git a/src/main/resources/settings/host/xml/settings_fragment.xml b/src/main/resources/settings/host/xml/settings_fragment.xml new file mode 100644 index 00000000..2c805129 --- /dev/null +++ b/src/main/resources/settings/host/xml/settings_fragment.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/settings/layout/xsettings_toolbar.xml b/src/main/resources/settings/layout/xsettings_toolbar.xml new file mode 100644 index 00000000..d416e99b --- /dev/null +++ b/src/main/resources/settings/layout/xsettings_toolbar.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/main/resources/settings/layout/xsettings_with_toolbar.xml b/src/main/resources/settings/layout/xsettings_with_toolbar.xml new file mode 100644 index 00000000..3043ff36 --- /dev/null +++ b/src/main/resources/settings/layout/xsettings_with_toolbar.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/main/resources/settings/layout/xsettings_with_toolbar_layout.xml b/src/main/resources/settings/layout/xsettings_with_toolbar_layout.xml new file mode 100644 index 00000000..2f6ef13c --- /dev/null +++ b/src/main/resources/settings/layout/xsettings_with_toolbar_layout.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/settings/xml/revanced_prefs.xml b/src/main/resources/settings/xml/revanced_prefs.xml new file mode 100644 index 00000000..6bb2367e --- /dev/null +++ b/src/main/resources/settings/xml/revanced_prefs.xml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/sponsorblock/values/strings.xml b/src/main/resources/sponsorblock/values/strings.xml index 25116298..15ba268b 100644 --- a/src/main/resources/sponsorblock/values/strings.xml +++ b/src/main/resources/sponsorblock/values/strings.xml @@ -57,7 +57,7 @@ About This app uses the API from SponsorBlock Tap to learn more, and see downloads for other platforms at: sponsor.ajay.app - Integration made by JakubWeg + Integration made by JakubWeg, recoded by oSumAtrIX Tap to skip Unable to submit segments: Status: %d %s @@ -105,9 +105,6 @@ Already read Show me - SponsorBlock settings - Uses the sponsor.ajay.app API - Show time without segments This time appears in brackets next to the current time. This shows the total video duration minus any segments. Channel whitelisting