Fix Kodi button showing up in unsupported services
This commit is contained in:
parent
40b1cd82b1
commit
9ca6cfd637
2 changed files with 10 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue