diff --git a/app/src/main/java/app/revanced/integrations/patches/spoof/SpoofDeviceDimensionsPatch.java b/app/src/main/java/app/revanced/integrations/patches/spoof/SpoofDeviceDimensionsPatch.java new file mode 100644 index 00000000..5ac5355c --- /dev/null +++ b/app/src/main/java/app/revanced/integrations/patches/spoof/SpoofDeviceDimensionsPatch.java @@ -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; + } +} diff --git a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java index 6b8c18a3..ac1605af 100644 --- a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java +++ b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java @@ -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