From 642b499e70fe088e6d80d345e15502888df02cd9 Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Wed, 31 Oct 2018 21:42:00 +0530 Subject: [PATCH] Fix crash with default resolution best on mobile data --- app/src/main/java/org/schabi/newpipe/util/ListHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java index 871d0578f..8fc423837 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java @@ -110,7 +110,8 @@ public final class ListHelper { : context.getString(R.string.best_resolution_key); String maxResolution = getResolutionLimit(context); - if (maxResolution != null && compareVideoStreamResolution(maxResolution, resolution) < 1){ + if (maxResolution != null && (resolution.equals(context.getString(R.string.best_resolution_key)) + || compareVideoStreamResolution(maxResolution, resolution) < 1)) { resolution = maxResolution; } return resolution;