Bug 1410456 - Allow OMT access to Android system audio properties. r?esawin
MozReview-Commit-ID: 4YkiuzNkNu5
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
@@ -1831,34 +1831,34 @@ public class GeckoAppShell
final WindowManager wm = (WindowManager)
getApplicationContext().getSystemService(Context.WINDOW_SERVICE);
final Display disp = wm.getDefaultDisplay();
sScreenSize = new Rect(0, 0, disp.getWidth(), disp.getHeight());
}
return sScreenSize;
}
- @WrapForJNI(calledFrom = "gecko")
+ @WrapForJNI(calledFrom = "any")
public static int getAudioOutputFramesPerBuffer() {
if (SysInfo.getVersion() < 17) {
return 0;
}
final AudioManager am = (AudioManager)getApplicationContext()
.getSystemService(Context.AUDIO_SERVICE);
if (am == null) {
return 0;
}
final String prop = am.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);
if (prop == null) {
return 0;
}
return Integer.parseInt(prop);
}
- @WrapForJNI(calledFrom = "gecko")
+ @WrapForJNI(calledFrom = "any")
public static int getAudioOutputSampleRate() {
if (SysInfo.getVersion() < 17) {
return 0;
}
final AudioManager am = (AudioManager)getApplicationContext()
.getSystemService(Context.AUDIO_SERVICE);
if (am == null) {
return 0;
--- a/widget/android/GeneratedJNIWrappers.h
+++ b/widget/android/GeneratedJNIWrappers.h
@@ -809,17 +809,17 @@ public:
typedef mozilla::jni::Args<> Args;
static constexpr char name[] = "getAudioOutputFramesPerBuffer";
static constexpr char signature[] =
"()I";
static const bool isStatic = true;
static const mozilla::jni::ExceptionMode exceptionMode =
mozilla::jni::ExceptionMode::ABORT;
static const mozilla::jni::CallingThread callingThread =
- mozilla::jni::CallingThread::GECKO;
+ mozilla::jni::CallingThread::ANY;
static const mozilla::jni::DispatchTarget dispatchTarget =
mozilla::jni::DispatchTarget::CURRENT;
};
static auto GetAudioOutputFramesPerBuffer() -> int32_t;
struct GetAudioOutputSampleRate_t {
typedef GeckoAppShell Owner;
@@ -828,17 +828,17 @@ public:
typedef mozilla::jni::Args<> Args;
static constexpr char name[] = "getAudioOutputSampleRate";
static constexpr char signature[] =
"()I";
static const bool isStatic = true;
static const mozilla::jni::ExceptionMode exceptionMode =
mozilla::jni::ExceptionMode::ABORT;
static const mozilla::jni::CallingThread callingThread =
- mozilla::jni::CallingThread::GECKO;
+ mozilla::jni::CallingThread::ANY;
static const mozilla::jni::DispatchTarget dispatchTarget =
mozilla::jni::DispatchTarget::CURRENT;
};
static auto GetAudioOutputSampleRate() -> int32_t;
struct GetConnection_t {
typedef GeckoAppShell Owner;