Do not discriminate against non-Amazon TV boxes
This commit is contained in:
parent
1bb96ef405
commit
6791de5fc0
1 changed files with 9 additions and 1 deletions
|
@ -1,10 +1,18 @@
|
|||
package org.schabi.newpipe.util;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
import org.schabi.newpipe.App;
|
||||
|
||||
public class FireTvUtils {
|
||||
@SuppressLint("InlinedApi")
|
||||
public static boolean isFireTv(){
|
||||
final String AMAZON_FEATURE_FIRE_TV = "amazon.hardware.fire_tv";
|
||||
return App.getApp().getPackageManager().hasSystemFeature(AMAZON_FEATURE_FIRE_TV);
|
||||
|
||||
PackageManager pm = App.getApp().getPackageManager();
|
||||
|
||||
return pm.hasSystemFeature(AMAZON_FEATURE_FIRE_TV)
|
||||
|| pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue