1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-25 12:32:31 +01:00

Remove useless getString for default setting value

This commit is contained in:
Stypox 2021-01-28 14:35:00 +01:00
parent cade272501
commit 376cba696e
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -265,14 +265,13 @@ public final class PlayerHelper {
@AutoplayType
public static int getAutoplayType(@NonNull final Context context) {
final String type = getPreferences(context).getString(
context.getString(R.string.autoplay_key),
context.getString(R.string.autoplay_wifi_key));
context.getString(R.string.autoplay_key), "");
if (type.equals(context.getString(R.string.autoplay_always_key))) {
return AUTOPLAY_TYPE_ALWAYS;
} else if (type.equals(context.getString(R.string.autoplay_never_key))) {
return AUTOPLAY_TYPE_NEVER;
} else {
return AUTOPLAY_TYPE_WIFI;
return AUTOPLAY_TYPE_WIFI; // default
}
}