Better detection of TV devices

Some devices were not detected as TV even though they are
This commit is contained in:
bopol 2020-04-25 11:35:15 +02:00
parent 820135f0ea
commit 1e4e731a6a
9 changed files with 43 additions and 19 deletions

View file

@ -539,7 +539,7 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo>
thumbnailBackgroundButton.requestFocus();
if (AndroidTvUtils.isTv()) {
if (AndroidTvUtils.isTv(getContext())) {
// remove ripple effects from detail controls
final int transparent = getResources().getColor(R.color.transparent_background_color);
detailControlsAddToPlaylist.setBackgroundColor(transparent);

View file

@ -511,7 +511,7 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
if (isSuggestionsEnabled && errorPanelRoot.getVisibility() != View.VISIBLE) {
showSuggestionsPanel();
}
if (AndroidTvUtils.isTv()) {
if (AndroidTvUtils.isTv(getContext())) {
showKeyboardSearch();
}
});