Disable PiP option on Fire OS due to Amazon guidelines

This commit is contained in:
Cameron Gutman 2020-06-24 17:26:58 -07:00
parent 2ad1aaa277
commit f5d51b2061

View File

@ -154,9 +154,11 @@ public class StreamSettings extends Activity {
}
}
// Remove PiP mode on devices pre-Oreo or where the feature is not available (some low RAM devices)
// Remove PiP mode on devices pre-Oreo, where the feature is not available (some low RAM devices),
// and on Fire OS where it violates the Amazon App Store guidelines for some reason.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O ||
!getActivity().getPackageManager().hasSystemFeature("android.software.picture_in_picture")) {
!getActivity().getPackageManager().hasSystemFeature("android.software.picture_in_picture") ||
getActivity().getPackageManager().hasSystemFeature("com.amazon.software.fireos")) {
PreferenceCategory category =
(PreferenceCategory) findPreference("category_ui_settings");
category.removePreference(findPreference("checkbox_enable_pip"));