feat: settings patch

This commit is contained in:
oSumAtrIX 2022-07-31 12:15:26 +02:00 committed by GitHub
parent b3d8dc2219
commit 0e229a46cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 646 additions and 11 deletions

View file

@ -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

View file

@ -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.")

View file

@ -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.")

View file

@ -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.")

View file

@ -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

View file

@ -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(

View file

@ -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

View file

@ -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"
}
)

View file

@ -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"
}
)

View file

@ -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()
}
}

View file

@ -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()
}
}

View file

@ -0,0 +1,14 @@
<resources>
<string-array name="revanced_button_location_entries">
<item>@string/revanced_button_location_entry_none</item>
<item>@string/revanced_button_location_entry_player</item>
<item>@string/revanced_button_location_entry_buttoncontainer</item>
<item>@string/revanced_button_location_entry_both</item>
</string-array>
<string-array name="revanced_button_location_entry_values">
<item>NONE</item>
<item>PLAYER</item>
<item>BUTTON_CONTAINER</item>
<item>BOTH</item>
</string-array>
</resources>

View file

@ -0,0 +1,227 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="revanced_auto_repeat_button_summary_off">"Doesn't show auto-repeat button in the player overlay. Use the toggle below to control auto-repeat"</string>
<string name="revanced_auto_repeat_button_summary_on">Auto-repeat button is shown in the player overlay</string>
<string name="revanced_auto_repeat_button_title">Auto-repeat button</string>
<string name="revanced_auto_repeat_summary_off">Always Auto-repeat is off</string>
<string name="revanced_auto_repeat_summary_on">Always Auto-repeat is on</string>
<string name="revanced_auto_repeat_title">Always Auto-repeat</string>
<string name="revanced_branding_watermark_summary_off">Video watermark is hidden</string>
<string name="revanced_branding_watermark_summary_on">Video watermark is shown</string>
<string name="revanced_branding_watermark_title">Video watermark</string>
<string name="revanced_buffer_title">Buffer settings</string>
<string name="revanced_cast_button_summary_off">Cast button is hidden</string>
<string name="revanced_cast_button_summary_on">Cast button is shown</string>
<string name="revanced_cast_button_title">Cast button</string>
<string name="revanced_autoplay_button_summary_off">Autoplay button is hidden</string>
<string name="revanced_autoplay_button_summary_on">Autoplay button is shown</string>
<string name="revanced_autoplay_button_title">Autoplay button</string>
<string name="revanced_codec_override_title">Codec override</string>
<string name="revanced_debug_summary_off">Extra debug logging is disabled</string>
<string name="revanced_debug_summary_on">Extra Debug logging is enabled</string>
<string name="revanced_debug_title">Debug mode</string>
<string name="revanced_discord_summary">Tap to join ReVanced on Discord</string>
<string name="revanced_discord_title">Discord server</string>
<string name="revanced_hdr_full_brightness_summary_on">Video brightness will follow your device\'s brightness on HDR landscape videos</string>
<string name="revanced_hdr_full_brightness_summary_off">Video brightness is set to max on HDR landscape videos</string>
<string name="revanced_hdr_full_brightness_title">Override HDR Video Brightness</string>
<string name="revanced_info_cards_summary_off">Info cards are hidden</string>
<string name="revanced_info_cards_summary_on">Info cards are shown</string>
<string name="revanced_info_cards_title">Info cards</string>
<string name="revanced_layout_settings_title">Layout settings</string>
<string name="revanced_maximum_buffer_summary">"The maximum duration of media that the player will attempt to buffer (in milliseconds)
Default: 120000"</string>
<string name="revanced_maximum_buffer_title">Maximum buffer</string>
<string name="revanced_misc_title">Miscellaneous</string>
<string name="revanced_playback_start_summary">"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"</string>
<string name="revanced_playback_start_title">Playback start</string>
<string name="revanced_preferred_video_speed_summary">Select preferred video speed</string>
<string name="revanced_preferred_video_speed_title">Preferred video speed</string>
<string name="revanced_rebuffer_summary">"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"</string>
<string name="revanced_rebuffer_title">Rebuffer</string>
<string name="revanced_suggestion_summary_off">End screens are hidden</string>
<string name="revanced_suggestion_summary_on">End screens are shown</string>
<string name="revanced_suggestion_title">End screens</string>
<string name="revanced_support_summary">Support links</string>
<string name="revanced_support_title">Support</string>
<string name="revanced_video_settings_title">Video settings</string>
<string name="revanced_vp9_summary">Tap to force usage of the VP9 codec</string>
<string name="revanced_vp9_summary_off">VP9 codec not forced</string>
<string name="revanced_vp9_summary_on">VP9 codec is enabled by default for supported devices, disable if you encounter stuttering/slowness in videos</string>
<string name="revanced_vp9_title">VP9 codec</string>
<string name="revanced_new_actionbar_title">Wide search bar</string>
<string name="revanced_new_actionbar_summary_off">Search bar style is defined by the app</string>
<string name="revanced_new_actionbar_summary_on">Forcing wide search bar</string>
<string name="revanced_shorts_button_title">Show shorts button</string>
<string name="revanced_shorts_button_summary_off">Shorts button is hidden</string>
<string name="revanced_shorts_button_summary_on">Shorts button is shown</string>
<string name="revanced_fullscreen_panels_title">Fullscreen panels</string>
<string name="revanced_fullscreen_panels_summary_off">Fullscreen panels are hidden</string>
<string name="revanced_fullscreen_panels_summary_on">Fullscreen panels are shown</string>
<string name="revanced_zoom_to_fit_vertical_title">Dynamic player</string>
<string name="revanced_zoom_to_fit_vertical_summary_off">Dynamic player is defined automatically</string>
<string name="revanced_zoom_to_fit_vertical_summary_on">Dynamic player is forced on square and vertical videos</string>
<string name="revanced_auto_captions_summary_off">Captions aren\'t enabled automatically at 0% volume </string>
<string name="revanced_auto_captions_summary_on">Captions are enabled automatically at 0% volume</string>
<string name="revanced_auto_captions_title">Auto captions</string>
<string name="revanced_swipe_brightness_summary_off">Swipe controls for brightness are disabled</string>
<string name="revanced_swipe_brightness_summary_on">Swipe controls for brightness are enabled</string>
<string name="revanced_swipe_brightness_title">Swipe controls for Brightness</string>
<string name="revanced_swipe_screen_summary">Swipe controls for Brightness and Volume</string>
<string name="revanced_swipe_title">Swipe controls</string>
<string name="revanced_swipe_volume_summary_off">Swipe controls for volume are disabled</string>
<string name="revanced_swipe_volume_summary_on">Swipe controls for volume are enabled</string>
<string name="revanced_swipe_volume_title">Swipe controls for Volume</string>
<string name="revanced_swipe_pts_title">Press-to-Swipe</string>
<string name="revanced_swipe_pts_summary_off">Swipe controls are always active</string>
<string name="revanced_swipe_pts_summary_on">Swipe controls require a long-press before activating</string>
<string name="revanced_swipe_pts_haptic_title">Vibrate on Press-to-Swipe</string>
<string name="revanced_swipe_pts_haptic_summary_on">You\'ll get haptic feedback when activating Press-to-Swipe</string>
<string name="revanced_swipe_pts_haptic_summary_off">You won\'t get haptic feedback when activating Press-to-Swipe</string>
<string name="revanced_swipe_overlay_timeout_title">Overlay Timeout</string>
<string name="revanced_swipe_overlay_timeout_summary">How long the overlay is shown after changes (ms)</string>
<string name="revanced_swipe_overlay_text_size_title">Overlay Text Size</string>
<string name="revanced_swipe_overlay_text_size_summary">Text size on the overlay</string>
<string name="revanced_swipe_overlay_bg_alpha_title">Overlay Background Transparency</string>
<string name="revanced_swipe_overlay_bg_alpha_summary">Transparency value of the overlay background (0255)</string>
<string name="revanced_swipe_magnitude_threshold_title">Swipe Magnitude Threshold</string>
<string name="revanced_swipe_magnitude_threshold_summary">Minimum magnitude before a swipe is detected</string>
<string name="revanced_swipe_tablet_title">Tablet style</string>
<string name="revanced_swipe_tablet_summary_on">Tablet style is turned on. For example suggested videos are only partially working</string>
<string name="revanced_swipe_tablet_summary_off">Tablet style is turned off</string>
<string name="revanced_website_summary">Tap to open our website</string>
<string name="revanced_website_title">ReVanced website</string>
<string name="revanced_home_ads_summary_off">Home ADS are hidden</string>
<string name="revanced_home_ads_summary_on">Home ADS are shown</string>
<string name="revanced_home_ads_title">Home ADS</string>
<string name="revanced_video_ads_title">Video ADS</string>
<string name="revanced_video_ads_summary_off">Video ADS are hidden</string>
<string name="revanced_video_ads_summary_on">Video ADS are shown</string>
<string name="revanced_reel_summary_off">Stories are hidden</string>
<string name="revanced_reel_summary_on">Stories are shown</string>
<string name="revanced_reel_title">YouTube stories</string>
<string name="revanced_ad_settings_title">AD settings</string>
<string name="revanced_tablet_miniplayer_summary_off">Tablet miniplayer is not being used</string>
<string name="revanced_tablet_miniplayer_summary_on">Tablet miniplayer is being used</string>
<string name="revanced_tablet_miniplayer_title">Tablet miniplayer</string>
<string name="litho_comments">Comments removal</string>
<string name="litho_comments_off">Comments removal is turned off (new comments / phones only)</string>
<string name="litho_comments_on">Comments removal is turned on (new comments / phones only)</string>
<string name="litho_community_posts">Community post removal</string>
<string name="litho_community_posts_off">Community post removal is turned off</string>
<string name="litho_community_posts_on">Community post removal is turned on</string>
<string name="litho_compact_banner">Compact banner removal</string>
<string name="litho_compact_banner_off">Compact banner removal is turned off</string>
<string name="litho_compact_banner_on">Compact banner removal is turned on</string>
<string name="litho_compact_movie">Compact movie removal</string>
<string name="litho_compact_movie_off">Compact movie removal is turned off</string>
<string name="litho_compact_movie_on">Compact movie removal is turned on</string>
<string name="litho_general_ad_removal">General layout ad removal</string>
<string name="litho_general_ad_removal_off">General layout ad removal is turned off</string>
<string name="litho_general_ad_removal_on">General layout ad removal is turned on</string>
<string name="litho_horizontal_movie_shelf">Movie shelf removal</string>
<string name="litho_horizontal_movie_shelf_off">Movie shelf removal is turned off</string>
<string name="litho_horizontal_movie_shelf_on">Movie shelf removal is turned on</string>
<string name="litho_in_feed_survey">Survey removal</string>
<string name="litho_in_feed_survey_off">Feed survey removal is turned off</string>
<string name="litho_in_feed_survey_on">Feed survey removal is turned on</string>
<string name="litho_merchandise">Merchandise removal</string>
<string name="litho_merchandise_off">Merchandise removal is turned off</string>
<string name="litho_merchandise_on">Merchandise removal is turned on</string>
<string name="litho_movie_upsell">Movie upsell removal</string>
<string name="litho_movie_upsell_off">Movie upsell removal is turned off</string>
<string name="litho_movie_upsell_on">Movie upsell removal is turned on</string>
<string name="litho_emergency_box">Emergency box removal</string>
<string name="litho_emergency_box_on">Emergency box removal is turned on</string>
<string name="litho_emergency_box_off">Emergency box removal is turned off</string>
<string name="litho_info_panel">Info panel removal</string>
<string name="litho_info_panel_on">Info panel removal is turned on</string>
<string name="litho_info_panel_off">Info panel removal is turned off</string>
<string name="litho_medical_panel">Medical panel removal</string>
<string name="litho_medical_panel_on">Medical panel removal is turned on</string>
<string name="litho_medical_panel_off">Medical panel removal is turned off</string>
<string name="litho_paid_content">Paid content removal</string>
<string name="litho_paid_content_on">Paid content removal is turned on</string>
<string name="litho_paid_content_off">Paid content removal is turned off</string>
<string name="litho_suggested">Suggested for you removal</string>
<string name="litho_suggested_on">Suggested for you removal is turned on</string>
<string name="litho_suggested_off">Suggested for you removal is turned off</string>
<string name="litho_hide_suggestions">General Suggestions removal</string>
<string name="litho_hide_suggestions_on">General Suggestions removal is turned on</string>
<string name="litho_hide_suggestions_off">General Suggestions removal is turned off</string>
<string name="litho_latest_posts">Latest posts removal</string>
<string name="litho_latest_posts_on">Latest posts removal is turned on</string>
<string name="litho_latest_posts_off">Latest posts removal is turned off</string>
<string name="litho_channel_guidelines">Channel guidelines removal</string>
<string name="litho_channel_guidelines_on">Channel guidelines removal is turned on</string>
<string name="litho_channel_guidelines_off">Channel guidelines removal is turned off</string>
<string name="microg_notification_settings">Notification settings</string>
<string name="microg_notification_settings_summary">"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."</string>
<string name="microg_settings">MicroG settings</string>
<string name="revanced_settings">ReVanced settings</string>
<string name="revanced_seekbar_tapping">Seekbar Tapping</string>
<string name="revanced_seekbar_tapping_off">Seekbar Tapping (video progress bar) is disabled</string>
<string name="revanced_seekbar_tapping_on">Seekbar Tapping (video progress bar) is enabled</string>
<string name="revanced_minimized_playback">Background playback</string>
<string name="revanced_minimized_playback_off">Background playback is disabled</string>
<string name="revanced_minimized_playback_on">Background playback is enabled</string>
<string name="pref_subtitles_scale_normal">Normal</string>
<string name="litho_shorts_shelf">Shorts Shelf</string>
<string name="litho_shorts_shelf_off">Shorts Shelf removal is turned off</string>
<string name="litho_shorts_shelf_on">Shorts Shelf removal is turned on</string>
<string name="revanced_create_button_summary_off">Create Button is hidden</string>
<string name="revanced_create_button_summary_on">Create Button is shown</string>
<string name="revanced_create_button_title">Create Button</string>
<string name="litho_community_guidelines">Community Guidelines</string>
<string name="litho_community_guidelines_off">Community Guidelines removal is turned off</string>
<string name="litho_community_guidelines_on">Community Guidelines removal is turned on</string>
<string name="revanced_copy_video_url_summary_off">Copy Link Button is hidden from the player overlay</string>
<string name="revanced_copy_video_url_summary_on">Copy Link Button is shown in the player overlay</string>
<string name="revanced_copy_video_url_timestamp_summary_off">Copy Link Button With Timestamp is hidden from the player overlay</string>
<string name="revanced_copy_video_url_timestamp_summary_on">Copy Link Button With Timestamp is shown in the player overlay</string>
<string name="revanced_copy_video_url_timestamp_title">Copy Link Button With Timestamp</string>
<string name="revanced_copy_video_url_title">Copy Link Button</string>
<string name="revanced_old_style_quality_settings_title">Quality Settings style</string>
<string name="revanced_old_style_quality_settings_summary_off">Using default style video quality settings</string>
<string name="revanced_old_style_quality_settings_summary_on">Using old style video quality settings</string>
<string name="revanced_videoadwhitelisting_title">Video ad whitelisting</string>
<string name="revanced_videoadwhitelisting_summary_off">Video ad whitelisting is turned off</string>
<string name="revanced_videoadwhitelisting_summary_on">Video ad whitelisting is turned on. Use the ADS button under the player to whitelist a channel</string>
<string name="revanced_whitelisting_ads">ADS</string>
<string name="revanced_whitelisting_sponsorblock">SponsorBlock</string>
<string name="revanced_whitelisting_added" formatted="false">Channel %s was added to the %s whitelist</string>
<string name="revanced_whitelisting_removed" formatted="false">Channel %s was removed from the %s whitelist</string>
<string name="revanced_whitelisting_add_failed" formatted="false">Failed to add channel %s to the %s whitelist</string>
<string name="revanced_whitelisting_remove_failed" formatted="false">Failed to remove channel %s from the %s whitelist</string>
<string name="revanced_whitelisting_fetch_failed" formatted="false">Failed to retrieve channel details, received code %d</string>
<string name="revanced_button_location_entry_none">Hidden</string>
<string name="revanced_button_location_entry_player">In player</string>
<string name="revanced_button_location_entry_buttoncontainer">Under player</string>
<string name="revanced_button_location_entry_both">Both</string>
<string name="revanced_ryd_settings_title">Return YouTube Dislike settings</string>
<string name="revanced_ryd_settings_summary">Uses the RYD API</string>
<string name="sb_settings">SponsorBlock settings</string>
<string name="sb_summary">Uses the sponsor.ajay.app API</string>
<string name="revanced_ryd_title">Enable RYD</string>
<string name="revanced_ryd_summary">Switch this on to see the dislike counts again</string>
<string name="revanced_ryd_attribution_title">Return YouTube Dislike Integration</string>
<string name="revanced_ryd_attribution_summary">This integration uses the RYD API from https://returnyoutubedislike.com. Tap to learn more</string>
</resources>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<Preference android:title="@string/revanced_ryd_settings_title" android:summary="@string/revanced_ryd_settings_summary">
<intent android:targetPackage="com.google.android.youtube" android:data="ryd_settings" android:targetClass="com.google.android.libraries.social.licenses.LicenseActivity"/>
</Preference>
<Preference android:title="@string/sb_settings" android:summary="@string/sb_summary">
<intent android:targetPackage="com.google.android.youtube" android:data="sponsorblock_settings" android:targetClass="com.google.android.libraries.social.licenses.LicenseActivity"/>
</Preference>
<Preference android:title="@string/revanced_settings">
<intent android:targetPackage="com.google.android.youtube" android:data="revanced_settings" android:targetClass="com.google.android.libraries.social.licenses.LicenseActivity"/>
</Preference>
</PreferenceScreen>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:background="@color/yt_white1" android:layout_width="match_parent" android:layout_height="wrap_content" android:elevation="4dp">
<android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:background="?attr/ytBrandBackgroundSolid" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" app:navigationIcon="@drawable/quantum_ic_arrow_back_white_24" app:title="ReVanced settings"/>
</FrameLayout>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<merge>
<include layout="@layout/xsettings_with_toolbar_layout"/>
</merge>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:fitsSystemWindows="true" android:layout_width="match_parent" android:layout_height="match_parent" android:transitionGroup="true">
<include layout="@layout/xsettings_toolbar"/>
<FrameLayout android:id="@+id/xsettings_fragments" android:layout_width="match_parent" android:layout_height="match_parent"/>
</LinearLayout>

View file

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:yt="http://schemas.android.com/apk/res-auto">
<PreferenceCategory
android:layout_height="match_parent"
android:title="@string/revanced_settings" />
<PreferenceScreen android:title="@string/revanced_codec_override_title" android:key="revanced_override_codec">
<SwitchPreference android:title="@string/revanced_vp9_title" android:key="revanced_override_codec_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_vp9_summary_on" android:summaryOff="@string/revanced_vp9_summary_off" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/revanced_video_settings_title" android:key="video_settings">
<SwitchPreference android:title="@string/revanced_old_style_quality_settings_title" android:key="revanced_use_old_style_quality_settings" android:defaultValue="true" android:summaryOn="@string/revanced_old_style_quality_settings_summary_on" android:summaryOff="@string/revanced_old_style_quality_settings_summary_off" />
<ListPreference android:title="@string/revanced_preferred_video_speed_title" android:key="revanced_pref_video_speed" android:summary="@string/revanced_preferred_video_speed_summary" />
<!--<SwitchPreference android:title="Auto captions" android:key="revanced_pref_auto_captions" android:defaultValue="false" android:summaryOn="Auto captions are turned on" android:summaryOff="Auto captions are turned off" />-->
</PreferenceScreen>
<!--<PreferenceScreen android:title="@string/revanced_videoadwhitelisting_title" android:key="video_ad_settings">
<SwitchPreference android:title="@string/revanced_videoadwhitelisting_title" android:key="revanced_whitelist_ads_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_videoadwhitelisting_summary_on" android:summaryOff="@string/revanced_videoadwhitelisting_summary_off" />
</PreferenceScreen>-->
<PreferenceScreen
android:key="ad_settings"
android:title="@string/revanced_ad_settings_title">
<SwitchPreference
android:defaultValue="false"
android:key="revanced_home_ads_enabled"
android:summaryOff="@string/revanced_home_ads_summary_off"
android:summaryOn="@string/revanced_home_ads_summary_on"
android:title="@string/revanced_home_ads_title" />
<SwitchPreference
android:defaultValue="false"
android:key="revanced_video_ads_enabled"
android:summaryOff="@string/revanced_video_ads_summary_off"
android:summaryOn="@string/revanced_video_ads_summary_on"
android:title="@string/revanced_video_ads_title" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_ad_removal"
android:summaryOff="@string/litho_general_ad_removal_off"
android:summaryOn="@string/litho_general_ad_removal_on"
android:title="@string/litho_general_ad_removal" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_merchandise"
android:summaryOff="@string/litho_merchandise_off"
android:summaryOn="@string/litho_merchandise_on"
android:title="@string/litho_merchandise" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_community_posts_removal"
android:summaryOff="@string/litho_community_posts_off"
android:summaryOn="@string/litho_community_posts_on"
android:title="@string/litho_community_posts" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_compact_banner_removal"
android:summaryOff="@string/litho_compact_banner_off"
android:summaryOn="@string/litho_compact_banner_on"
android:title="@string/litho_compact_banner" />
<SwitchPreference
android:defaultValue="false"
android:key="revanced_adremover_comments_removal"
android:summaryOff="@string/litho_comments_off"
android:summaryOn="@string/litho_comments_on"
android:title="@string/litho_comments" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_movie"
android:summaryOff="@string/litho_compact_movie_off"
android:summaryOn="@string/litho_compact_movie_on"
android:title="@string/litho_compact_movie" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_feed_survey"
android:summaryOff="@string/litho_in_feed_survey_off"
android:summaryOn="@string/litho_in_feed_survey_on"
android:title="@string/litho_in_feed_survey" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_shorts_shelf"
android:summaryOff="@string/litho_shorts_shelf_off"
android:summaryOn="@string/litho_shorts_shelf_on"
android:title="@string/litho_shorts_shelf" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_community_guideline"
android:summaryOff="@string/litho_community_guidelines_off"
android:summaryOn="@string/litho_community_guidelines_on"
android:title="@string/litho_community_guidelines" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_emergency_box_removal"
android:summaryOff="@string/litho_emergency_box_off"
android:summaryOn="@string/litho_emergency_box_on"
android:title="@string/litho_emergency_box" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_info_panel"
android:summaryOff="@string/litho_info_panel_off"
android:summaryOn="@string/litho_info_panel_on"
android:title="@string/litho_info_panel" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_medical_panel"
android:summaryOff="@string/litho_medical_panel_off"
android:summaryOn="@string/litho_medical_panel_on"
android:title="@string/litho_medical_panel" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_paid_content"
android:summaryOff="@string/litho_paid_content_off"
android:summaryOn="@string/litho_paid_content_on"
android:title="@string/litho_paid_content" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_suggested"
android:summaryOff="@string/litho_suggested_off"
android:summaryOn="@string/litho_suggested_on"
android:title="@string/litho_suggested" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_hide_suggestions"
android:summaryOff="@string/litho_hide_suggestions_off"
android:summaryOn="@string/litho_hide_suggestions_on"
android:title="@string/litho_hide_suggestions" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_hide_latest_posts"
android:summaryOff="@string/litho_latest_posts_off"
android:summaryOn="@string/litho_latest_posts_on"
android:title="@string/litho_latest_posts" />
<SwitchPreference
android:defaultValue="true"
android:key="revanced_adremover_hide_channel_guidelines"
android:summaryOff="@string/litho_channel_guidelines_off"
android:summaryOn="@string/litho_channel_guidelines_on"
android:title="@string/litho_channel_guidelines" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/revanced_layout_settings_title" android:key="layout_settings">
<SwitchPreference android:title="@string/revanced_reel_title" android:key="revanced_reel_button_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_reel_summary_on" android:summaryOff="@string/revanced_reel_summary_off" />
<SwitchPreference android:title="@string/revanced_suggestion_title" android:key="revanced_info_cards_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_suggestion_summary_on" android:summaryOff="@string/revanced_suggestion_summary_off" />
<SwitchPreference android:title="@string/revanced_branding_watermark_title" android:key="revanced_branding_watermark_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_branding_watermark_summary_on" android:summaryOff="@string/revanced_branding_watermark_summary_off" />
<SwitchPreference android:title="@string/revanced_cast_button_title" android:key="revanced_cast_button_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_cast_button_summary_on" android:summaryOff="@string/revanced_cast_button_summary_off" />
<SwitchPreference android:title="@string/revanced_autoplay_button_title" android:key="revanced_autoplay_button_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_autoplay_button_summary_on" android:summaryOff="@string/revanced_autoplay_button_summary_off" />
<!--<SwitchPreference android:title="@string/revanced_tablet_miniplayer_title" android:key="revanced_tablet_miniplayer" android:defaultValue="false" android:summaryOn="@string/revanced_tablet_miniplayer_summary_on" android:summaryOff="@string/revanced_tablet_miniplayer_summary_off" />-->
<SwitchPreference android:title="@string/revanced_create_button_title" android:key="revanced_create_button_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_create_button_summary_on" android:summaryOff="@string/revanced_create_button_summary_off" />
<SwitchPreference android:title="@string/revanced_new_actionbar_title" android:key="revanced_new_actionbar" android:defaultValue="false" android:summaryOn="@string/revanced_new_actionbar_summary_on" android:summaryOff="@string/revanced_new_actionbar_summary_off" />
<SwitchPreference android:title="@string/revanced_shorts_button_title" android:key="revanced_shorts_button_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_shorts_button_summary_on" android:summaryOff="@string/revanced_shorts_button_summary_off" />
<SwitchPreference android:title="@string/revanced_fullscreen_panels_title" android:key="revanced_fullscreen_panels_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_fullscreen_panels_summary_on" android:summaryOff="@string/revanced_fullscreen_panels_summary_off" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/revanced_misc_title" android:key="misc_screen">
<SwitchPreference android:title="@string/revanced_auto_repeat_title" android:key="revanced_pref_auto_repeat" android:defaultValue="false" android:summaryOn="@string/revanced_auto_repeat_summary_on" android:summaryOff="@string/revanced_auto_repeat_summary_off" />
<!--<ListPreference android:entries="@array/revanced_button_location_entries" android:title="@string/revanced_copy_video_url_timestamp_title" android:key="revanced_pref_copy_video_url_timestamp_button_list" android:entryValues="@array/revanced_button_location_entry_values" />
<ListPreference android:entries="@array/revanced_button_location_entries" android:title="@string/revanced_copy_video_url_title" android:key="revanced_pref_copy_video_url_button_list" android:entryValues="@array/revanced_button_location_entry_values" />-->
<SwitchPreference android:title="@string/revanced_hdr_full_brightness_title" android:key="revanced_pref_hdr_autobrightness" android:defaultValue="false" android:summaryOn="@string/revanced_hdr_full_brightness_summary_on" android:summaryOff="@string/revanced_hdr_full_brightness_summary_off" />
<SwitchPreference android:title="@string/revanced_seekbar_tapping" android:key="revanced_enable_tap_seeking" android:defaultValue="true" android:summaryOn="@string/revanced_seekbar_tapping_on" android:summaryOff="@string/revanced_seekbar_tapping_off" />
<SwitchPreference android:title="@string/revanced_minimized_playback" android:key="revanced_enable_minimized_playback" android:defaultValue="true" android:summaryOn="@string/revanced_minimized_playback_on" android:summaryOff="@string/revanced_minimized_playback_off" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/revanced_swipe_title" android:key="swipe_screen" android:summary="@string/revanced_swipe_screen_summary">
<SwitchPreference android:title="@string/revanced_swipe_brightness_title" android:key="revanced_enable_swipe_brightness" android:defaultValue="false" android:summaryOn="@string/revanced_swipe_brightness_summary_on" android:summaryOff="@string/revanced_swipe_brightness_summary_off" />
<SwitchPreference android:title="@string/revanced_swipe_volume_title" android:key="revanced_enable_swipe_volume" android:defaultValue="false" android:summaryOn="@string/revanced_swipe_volume_summary_on" android:summaryOff="@string/revanced_swipe_volume_summary_off" />
<SwitchPreference android:title="@string/revanced_swipe_pts_title" android:key="revanced_enable_press_to_swipe" android:defaultValue="false" android:summaryOn="@string/revanced_swipe_pts_summary_on" android:summaryOff="@string/revanced_swipe_pts_summary_off" />
<SwitchPreference android:title="@string/revanced_swipe_pts_haptic_title" android:key="revanced_enable_swipe_haptic_feedback" android:defaultValue="false" android:summaryOn="@string/revanced_swipe_pts_haptic_summary_on" android:summaryOff="@string/revanced_swipe_pts_haptic_summary_off" />
<EditTextPreference android:inputType="number" android:title="@string/revanced_swipe_overlay_timeout_title" android:key="revanced_swipe_overlay_timeout" android:summary="@string/revanced_swipe_overlay_timeout_summary" android:defaultValue="500" />
<EditTextPreference android:inputType="number" android:title="@string/revanced_swipe_overlay_text_size_title" android:key="revanced_swipe_overlay_text_size" android:summary="@string/revanced_swipe_overlay_text_size_summary" android:defaultValue="22" />
<EditTextPreference android:inputType="number" android:title="@string/revanced_swipe_overlay_bg_alpha_title" android:key="revanced_swipe_overlay_background_alpha" android:summary="@string/revanced_swipe_overlay_bg_alpha_summary" android:defaultValue="127" />
<EditTextPreference android:inputType="number" android:title="@string/revanced_swipe_magnitude_threshold_title" android:key="revanced_swipe_magnitude_threshold" android:summary="@string/revanced_swipe_magnitude_threshold_summary" android:defaultValue="30" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/revanced_buffer_title" android:key="buffer_screen">
<EditTextPreference android:inputType="number" android:title="@string/revanced_maximum_buffer_title" android:key="revanced_pref_max_buffer_ms" android:summary="@string/revanced_maximum_buffer_summary" android:defaultValue="120000" />
<EditTextPreference android:inputType="number" android:title="@string/revanced_playback_start_title" android:key="revanced_pref_buffer_for_playback_ms" android:summary="@string/revanced_playback_start_summary" android:defaultValue="2500" />
<EditTextPreference android:inputType="number" android:title="@string/revanced_rebuffer_title" android:key="revanced_pref_buffer_for_playback_after_rebuffer_ms" android:summary="@string/revanced_rebuffer_summary" android:defaultValue="5000" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/revanced_support_title" android:key="support_screen" android:summary="@string/revanced_support_summary">
<Preference android:title="@string/revanced_discord_title" android:summary="@string/revanced_discord_summary">
<intent android:action="android.intent.action.VIEW" android:data="https://discord.gg/rF2YcEjcrT" />
</Preference>
<Preference android:title="@string/revanced_website_title" android:summary="@string/revanced_website_summary">
<intent android:action="android.intent.action.VIEW" android:data="https://revanced.app" />
</Preference>
</PreferenceScreen>
<SwitchPreference android:title="@string/revanced_debug_title" android:key="revanced_debug_enabled" android:defaultValue="false" android:summaryOn="@string/revanced_debug_summary_on" android:summaryOff="@string/revanced_debug_summary_off" />
</PreferenceScreen>

View file

@ -57,7 +57,7 @@
<string name="about">About</string>
<string name="about_api">This app uses the API from SponsorBlock</string>
<string name="about_api_sum">Tap to learn more, and see downloads for other platforms at: sponsor.ajay.app</string>
<string name="about_madeby">Integration made by JakubWeg</string>
<string name="about_madeby">Integration made by JakubWeg, recoded by oSumAtrIX</string>
<string name="tap_skip">Tap to skip</string>
<string name="submit_failed_unknown_error" formatted="false">Unable to submit segments: Status: %d %s</string>
@ -105,9 +105,6 @@
<string name="sb_guidelines_popup_already_read">Already read</string>
<string name="sb_guidelines_popup_open">Show me</string>
<string name="sb_settings">SponsorBlock settings</string>
<string name="sb_summary">Uses the sponsor.ajay.app API</string>
<string name="general_time_without_sb">Show time without segments</string>
<string name="general_time_without_sb_sum">This time appears in brackets next to the current time. This shows the total video duration minus any segments.</string>
<string name="general_whitelisting">Channel whitelisting</string>