mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-10 12:00:03 +00:00
Remove useless getString for default setting value
This commit is contained in:
parent
cade272501
commit
376cba696e
@ -265,14 +265,13 @@ public final class PlayerHelper {
|
|||||||
@AutoplayType
|
@AutoplayType
|
||||||
public static int getAutoplayType(@NonNull final Context context) {
|
public static int getAutoplayType(@NonNull final Context context) {
|
||||||
final String type = getPreferences(context).getString(
|
final String type = getPreferences(context).getString(
|
||||||
context.getString(R.string.autoplay_key),
|
context.getString(R.string.autoplay_key), "");
|
||||||
context.getString(R.string.autoplay_wifi_key));
|
|
||||||
if (type.equals(context.getString(R.string.autoplay_always_key))) {
|
if (type.equals(context.getString(R.string.autoplay_always_key))) {
|
||||||
return AUTOPLAY_TYPE_ALWAYS;
|
return AUTOPLAY_TYPE_ALWAYS;
|
||||||
} else if (type.equals(context.getString(R.string.autoplay_never_key))) {
|
} else if (type.equals(context.getString(R.string.autoplay_never_key))) {
|
||||||
return AUTOPLAY_TYPE_NEVER;
|
return AUTOPLAY_TYPE_NEVER;
|
||||||
} else {
|
} else {
|
||||||
return AUTOPLAY_TYPE_WIFI;
|
return AUTOPLAY_TYPE_WIFI; // default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user