From 8970a663ec59cd743357500acba5d6f7b109fce4 Mon Sep 17 00:00:00 2001 From: Xiang Rong Lin <41164160+XiangRongLin@users.noreply.github.com> Date: Thu, 12 Dec 2019 19:15:15 +0100 Subject: [PATCH] Rename "seek_duration_default_key" and use it in BasePlayer --- app/src/main/java/org/schabi/newpipe/player/BasePlayer.java | 3 +-- app/src/main/res/values/settings_keys.xml | 2 +- app/src/main/res/xml/video_audio_settings.xml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index f35287648..6452a9850 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -178,7 +178,6 @@ public abstract class BasePlayer implements // Player //////////////////////////////////////////////////////////////////////////*/ - protected final static String FAST_FORWARD_REWIND_DEFAULT_AMOUNT_MILLIS = "10000"; // 10 seconds protected final static int PLAY_PREV_ACTIVATION_LIMIT_MILLIS = 5000; // 5 seconds protected final static int PROGRESS_LOOP_INTERVAL_MILLIS = 500; protected final static int RECOVERY_SKIP_THRESHOLD_MILLIS = 3000; // 3 seconds @@ -965,7 +964,7 @@ public abstract class BasePlayer implements private int getSeekDuration() { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); final String key = context.getString(R.string.seek_duration_key); - final String value = prefs.getString(key, FAST_FORWARD_REWIND_DEFAULT_AMOUNT_MILLIS); + final String value = prefs.getString(key, context.getString(R.string.seek_duration_default_value)); return Integer.parseInt(value); } diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index bd924dbdf..6aaaa0630 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -29,7 +29,7 @@ screen_brightness_timestamp_key seek_duration - 10000 + 10000 5 seconds 10 seconds diff --git a/app/src/main/res/xml/video_audio_settings.xml b/app/src/main/res/xml/video_audio_settings.xml index 484457ceb..0ff43ce90 100644 --- a/app/src/main/res/xml/video_audio_settings.xml +++ b/app/src/main/res/xml/video_audio_settings.xml @@ -149,7 +149,7 @@