Commit 28ace5f1 authored by Geoffrey Métais's avatar Geoffrey Métais

Disable Search feature on TV if not supported

Previously we blacklisted amazon devices, this is more generic
parent 59b9deb5
......@@ -144,11 +144,14 @@ public class MainTvActivity extends BaseTvActivity implements IVideoBrowser, OnI
mBrowseFragment.setOnItemViewClickedListener(this);
mBrowseFragment.setOnItemViewSelectedListener(this);
if (!Build.MANUFACTURER.equalsIgnoreCase("amazon")) { //Hide search for Amazon Fire TVs
//Enable search feature only if we detect Google Play Services.
try {
getPackageManager().getPackageInfo("com.google.android.gsf", PackageManager.GET_SERVICES);
mBrowseFragment.setOnSearchClickedListener(this);
// set search icon color
mBrowseFragment.setSearchAffordanceColor(getResources().getColor(R.color.orange500));
}
} catch (PackageManager.NameNotFoundException e) {}
mRootContainer = mBrowseFragment.getView();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment