diff options
author | fuzzard <fuzzard@users.noreply.github.com> | 2022-10-22 06:18:50 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-22 06:18:50 +1000 |
commit | 08499ae74d667efae8234ab59eb4d60ff33d2f47 (patch) | |
tree | 4ce5f75834badee71a7d00b43f43442814b40a1f | |
parent | 52d95880d7b4a175a29e72735d0ab2d84ea6818d (diff) | |
parent | 430048fd0b84aba38be9d2d5395adbebe040da33 (diff) |
Merge pull request #22046 from joseluismarti/leanback
[Android] Launch Leanback activities in StartActivity
-rw-r--r-- | xbmc/platform/android/activity/XBMCApp.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xbmc/platform/android/activity/XBMCApp.cpp b/xbmc/platform/android/activity/XBMCApp.cpp index a4cd9524e3..6e853c2b95 100644 --- a/xbmc/platform/android/activity/XBMCApp.cpp +++ b/xbmc/platform/android/activity/XBMCApp.cpp @@ -1020,8 +1020,13 @@ bool CXBMCApp::StartActivity(const std::string& package, GetPackageManager().getLaunchIntentForPackage(package) : CJNIIntent(intent); - if (!newIntent && CJNIBuild::SDK_INT >= 21) - newIntent = GetPackageManager().getLeanbackLaunchIntentForPackage(package); + if (intent.empty() && GetPackageManager().hasSystemFeature("android.software.leanback")) + { + CJNIIntent leanbackIntent = GetPackageManager().getLeanbackLaunchIntentForPackage(package); + if (leanbackIntent) + newIntent = leanbackIntent; + } + if (!newIntent) return false; |