mirror of
https://github.com/revanced/revanced-integrations
synced 2025-04-16 01:01:11 +02:00
feat(YouTube): Add Spoof device dimensions
patch
This commit is contained in:
parent
c47fcde242
commit
16f1163a34
app/src/main/java/app/revanced/integrations
14
app/src/main/java/app/revanced/integrations/patches/spoof/SpoofDeviceDimensionsPatch.java
Normal file
14
app/src/main/java/app/revanced/integrations/patches/spoof/SpoofDeviceDimensionsPatch.java
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
@ -177,6 +177,7 @@ public enum SettingsEnum {
|
|||||||
"revanced_spoof_signature_verification_enabled_user_dialog_message"),
|
"revanced_spoof_signature_verification_enabled_user_dialog_message"),
|
||||||
SPOOF_SIGNATURE_IN_FEED("revanced_spoof_signature_in_feed_enabled", BOOLEAN, FALSE, false,
|
SPOOF_SIGNATURE_IN_FEED("revanced_spoof_signature_in_feed_enabled", BOOLEAN, FALSE, false,
|
||||||
parents(SPOOF_SIGNATURE)),
|
parents(SPOOF_SIGNATURE)),
|
||||||
|
SPOOF_DEVICE_DIMENSIONS("revanced_spoof_device_dimensions", BOOLEAN, FALSE, true),
|
||||||
BYPASS_URL_REDIRECTS("revanced_bypass_url_redirects", BOOLEAN, TRUE),
|
BYPASS_URL_REDIRECTS("revanced_bypass_url_redirects", BOOLEAN, TRUE),
|
||||||
|
|
||||||
// Swipe controls
|
// Swipe controls
|
||||||
|
Loading…
x
Reference in New Issue
Block a user