1
mirror of https://github.com/revanced/revanced-integrations synced 2024-11-22 05:02:19 +01:00

feat(YouTube): Add Spoof device dimensions patch

This commit is contained in:
oSumAtrIX 2023-10-19 03:06:57 +02:00
parent c47fcde242
commit 16f1163a34
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,14 @@
package app.revanced.integrations.patches.spoof;
import app.revanced.integrations.settings.SettingsEnum;
public class SpoofDeviceDimensionsPatch {
private static final boolean SPOOF = SettingsEnum.SPOOF_DEVICE_DIMENSIONS.getBoolean();
public static int getMinHeightOrWidth(int minHeightOrWidth) {
return SPOOF ? 64 : minHeightOrWidth;
}
public static int getMaxHeightOrWidth(int maxHeightOrWidth) {
return SPOOF ? 4096 : maxHeightOrWidth;
}
}

View File

@ -177,6 +177,7 @@ public enum SettingsEnum {
"revanced_spoof_signature_verification_enabled_user_dialog_message"),
SPOOF_SIGNATURE_IN_FEED("revanced_spoof_signature_in_feed_enabled", BOOLEAN, FALSE, false,
parents(SPOOF_SIGNATURE)),
SPOOF_DEVICE_DIMENSIONS("revanced_spoof_device_dimensions", BOOLEAN, FALSE, true),
BYPASS_URL_REDIRECTS("revanced_bypass_url_redirects", BOOLEAN, TRUE),
// Swipe controls