Skip to content

Commit

Permalink
Do not discriminate against non-Amazon TV boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander committed Oct 7, 2019
1 parent 59128aa commit fe3b765
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/src/main/java/org/schabi/newpipe/util/FireTvUtils.java
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit fe3b765

Please sign in to comment.