Rename "seek_duration_default_key" and use it in BasePlayer
This commit is contained in:
parent
334437137e
commit
8970a663ec
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<string name="screen_brightness_timestamp_key" translatable="false">screen_brightness_timestamp_key</string>
|
||||
|
||||
<string name="seek_duration_key" translatable="false">seek_duration</string>
|
||||
<string name="seek_duration_default_key" translatable="false">10000</string>
|
||||
<string name="seek_duration_default_value" translatable="false">10000</string>
|
||||
<string-array name="seek_duration_description" translatable="false">
|
||||
<item>5 seconds</item>
|
||||
<item>10 seconds</item>
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
|
||||
<ListPreference
|
||||
app:iconSpaceReserved="false"
|
||||
android:defaultValue="@string/seek_duration_default_key"
|
||||
android:defaultValue="@string/seek_duration_default_value"
|
||||
android:entries="@array/seek_duration_description"
|
||||
android:entryValues="@array/seek_duration_value"
|
||||
android:key="@string/seek_duration_key"
|
||||
|
|
Loading…
Reference in New Issue