Merge pull request #3545 from Stypox/kore

Fix Kodi button showing up with unsupported services
This commit is contained in:
wb9688 2020-05-07 21:44:09 +02:00 committed by GitHub
commit b990f30a09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 12 deletions

View file

@ -7,10 +7,16 @@ import android.content.DialogInterface;
import androidx.appcompat.app.AlertDialog;
import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.ServiceList;
public final class KoreUtil {
private KoreUtil() { }
public static boolean isServiceSupportedByKore(final int serviceId) {
return (serviceId == ServiceList.YouTube.getServiceId()
|| serviceId == ServiceList.SoundCloud.getServiceId());
}
public static void showInstallKoreDialog(final Context context) {
final AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage(R.string.kore_not_found)