aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/invalid/lena/scrcpy/Settings.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/invalid/lena/scrcpy/Settings.java')
-rw-r--r--app/src/main/java/invalid/lena/scrcpy/Settings.java35
1 files changed, 0 insertions, 35 deletions
diff --git a/app/src/main/java/invalid/lena/scrcpy/Settings.java b/app/src/main/java/invalid/lena/scrcpy/Settings.java
index fab6ed1..70cf46a 100644
--- a/app/src/main/java/invalid/lena/scrcpy/Settings.java
+++ b/app/src/main/java/invalid/lena/scrcpy/Settings.java
@@ -15,9 +15,7 @@ public final class Settings {
public static final String AUDIO_CODEC = "audio_codec";
public static final String MAX_SIZE = "max_size"; // px, long edge; 0 = no cap
public static final String VIDEO_BIT_RATE = "video_bit_rate"; // bits/sec
- public static final String MAX_FPS = "max_fps"; // fps; 0 = unlimited
public static final String HINT_BACK_SHOWN = "hint_back_shown"; // first-run UI hint
- public static final String STATUS_BAR = "status_bar"; // show status bar while mirroring
public static final String CLIPBOARD = "clipboard"; // two-way clipboard sync
public static final String DEFAULT_VIDEO_CODEC = "h264";
@@ -30,14 +28,6 @@ public final class Settings {
// uplink; raise both in Settings when both devices are on the LAN.
public static final int DEFAULT_MAX_SIZE = 1080;
public static final int DEFAULT_VIDEO_BIT_RATE = 4_000_000;
- public static final int DEFAULT_MAX_FPS = 0;
- // Shown by default. It carries Back, Home and Recents, which are the
- // only way to reach the target's navigation: a swipe from the
- // source's bottom edge is taken by the source's own gesture
- // detector and never reaches us. Hiding it is a deliberate choice
- // for an unobstructed picture, not the default, because a control
- // the user cannot find is a control that does not exist.
- public static final boolean DEFAULT_STATUS_BAR = true;
// On by default: it is a headline feature and the target is one the
// user deliberately paired with. It is a setting because that trust
// is not absolute - a compromised target
@@ -84,16 +74,6 @@ public final class Settings {
}
}
- public static int maxFps(Context ctx) {
- int value = integer(ctx, MAX_FPS, DEFAULT_MAX_FPS);
- switch (value) {
- case 0: case 30: case 60: case 90: case 120:
- return value;
- default:
- return DEFAULT_MAX_FPS;
- }
- }
-
public static void setVideoCodec(Context ctx, String v) {
if (!"h264".equals(v) && !"h265".equals(v) && !"av1".equals(v)) {
throw new IllegalArgumentException("invalid video codec");
@@ -123,13 +103,6 @@ public final class Settings {
prefs(ctx).edit().putInt(VIDEO_BIT_RATE, v).apply();
}
- public static void setMaxFps(Context ctx, int v) {
- if (v != 0 && v != 30 && v != 60 && v != 90 && v != 120) {
- throw new IllegalArgumentException("invalid maximum frame rate");
- }
- prefs(ctx).edit().putInt(MAX_FPS, v).apply();
- }
-
public static boolean hintBackShown(Context ctx) {
return bool(ctx, HINT_BACK_SHOWN, false);
}
@@ -146,14 +119,6 @@ public final class Settings {
prefs(ctx).edit().putBoolean(CLIPBOARD, v).apply();
}
- public static boolean showStatusBar(Context ctx) {
- return bool(ctx, STATUS_BAR, DEFAULT_STATUS_BAR);
- }
-
- public static void setShowStatusBar(Context ctx, boolean v) {
- prefs(ctx).edit().putBoolean(STATUS_BAR, v).apply();
- }
-
private static String string(Context ctx, String key, String fallback) {
try {
String value = prefs(ctx).getString(key, fallback);