mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1322650 - Don't use AndroidBridge to get API version in media stack r=jolin
AndroidBridge is not available in child processes. MozReview-Commit-ID: KlBs8F1Bu1O
This commit is contained in:
parent
5f0f52f2b1
commit
22e9b1e4cc
@ -1640,8 +1640,7 @@ MediaDecoder::IsWebMEnabled()
|
||||
bool
|
||||
MediaDecoder::IsAndroidMediaPluginEnabled()
|
||||
{
|
||||
return AndroidBridge::Bridge()
|
||||
&& AndroidBridge::Bridge()->GetAPIVersion() < 16
|
||||
return jni::GetAPIVersion() < 16
|
||||
&& Preferences::GetBool("media.plugins.enabled");
|
||||
}
|
||||
#endif
|
||||
|
@ -7,7 +7,7 @@
|
||||
#define MEDIA_PREFS_H
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "AndroidBridge.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#endif
|
||||
|
||||
#include "mozilla/Atomics.h"
|
||||
@ -199,8 +199,7 @@ private:
|
||||
static int32_t MediaDecoderLimitDefault()
|
||||
{
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
if (AndroidBridge::Bridge() &&
|
||||
AndroidBridge::Bridge()->GetAPIVersion() < 18) {
|
||||
if (jni::GetAPIVersion() < 18) {
|
||||
// Older Android versions have broken support for multiple simultaneous
|
||||
// decoders, see bug 1278574.
|
||||
return 1;
|
||||
|
@ -2,8 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "AndroidDecoderModule.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "MediaInfo.h"
|
||||
#include "MediaPrefs.h"
|
||||
#include "OpusDecoder.h"
|
||||
@ -128,8 +127,7 @@ AndroidDecoderModule::SupportsMimeType(
|
||||
const nsACString& aMimeType,
|
||||
DecoderDoctorDiagnostics* aDiagnostics) const
|
||||
{
|
||||
if (!AndroidBridge::Bridge() ||
|
||||
AndroidBridge::Bridge()->GetAPIVersion() < 16) {
|
||||
if (jni::GetAPIVersion() < 16) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user