mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-25 05:53:05 +00:00
Revert "Fix crash on HarmonyOS due to broken TV content provider APIs"
This reverts commit ce0b19605a9fb651e333be0e99905d15f0165324.
This commit is contained in:
parent
17cf711c3d
commit
34a1697d50
@ -252,19 +252,7 @@ public class TvChannelHelper {
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.O)
|
||||
private boolean isAndroidTV() {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
|
||||
// HarmonyOS devices report PackageManager.FEATURE_LEANBACK yet
|
||||
// when we attempt to actually use TvContract, it will die with
|
||||
// an IllegalArgumentException because TvContract.Channels.CONTENT_URI
|
||||
// is an unknown URL. I don't know if this is a perfect check for
|
||||
// HarmonyOS-powered TVs (excluding any Android TVs), but it will
|
||||
// suffice for now.
|
||||
if (pm.hasSystemFeature("com.huawei.software.features.tv")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK);
|
||||
return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK);
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.O)
|
||||
|
Loading…
x
Reference in New Issue
Block a user