summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-04-07 12:35:19 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-04-08 12:24:44 -0700
commite0554d493e870ea5e323ed06f54becb93c19fa04 (patch)
tree8af5823e7a5e266812526a608b3080d646e1aba9 /core
parent726377a9ffe482eb6adc66c7e98007a0c12b6c6c (diff)
downloadframeworks_base-e0554d493e870ea5e323ed06f54becb93c19fa04.zip
frameworks_base-e0554d493e870ea5e323ed06f54becb93c19fa04.tar.gz
frameworks_base-e0554d493e870ea5e323ed06f54becb93c19fa04.tar.bz2
media: Add flags, channelMask, and UID to audio session callbacks
* This is to allow us to implement more sophisticated logic in the application on when to apply effects to a stream. Change-Id: I2931daa1546591e18d98acc91775c1fdafa3d453
Diffstat (limited to 'core')
-rw-r--r--core/jni/android_media_AudioSystem.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/jni/android_media_AudioSystem.cpp b/core/jni/android_media_AudioSystem.cpp
index 1acf867..a282a44 100644
--- a/core/jni/android_media_AudioSystem.cpp
+++ b/core/jni/android_media_AudioSystem.cpp
@@ -393,7 +393,8 @@ android_media_AudioSystem_dyn_policy_callback(int event, String8 regId, int val)
static void
android_media_AudioSystem_effect_session_callback(int event, audio_stream_type_t stream,
- audio_unique_id_t sessionId, bool added)
+ audio_unique_id_t sessionId, audio_output_flags_t flags,
+ audio_channel_mask_t channelMask, uid_t uid, bool added)
{
JNIEnv *env = AndroidRuntime::getJNIEnv();
if (env == NULL) {
@@ -403,7 +404,7 @@ android_media_AudioSystem_effect_session_callback(int event, audio_stream_type_t
jclass clazz = env->FindClass(kClassPathName);
env->CallStaticVoidMethod(clazz, gEffectSessionEventHandlerMethods.postEffectSessionEventFromNative,
- event, stream, sessionId, added);
+ event, stream, sessionId, flags, channelMask, uid, added);
env->DeleteLocalRef(clazz);
@@ -1799,7 +1800,7 @@ int register_android_media_AudioSystem(JNIEnv *env)
gEffectSessionEventHandlerMethods.postEffectSessionEventFromNative =
GetStaticMethodIDOrDie(env, env->FindClass(kClassPathName),
- "effectSessionCallbackFromNative", "(IIIZ)V");
+ "effectSessionCallbackFromNative", "(IIIIIIZ)V");
jclass audioMixClass = FindClassOrDie(env, "android/media/audiopolicy/AudioMix");
gAudioMixClass = MakeGlobalRefOrDie(env, audioMixClass);