-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not discriminate against non-Amazon TV boxes
- Loading branch information
Alexander
committed
Oct 7, 2019
1 parent
59128aa
commit fe3b765
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |