Loading core/java/android/view/ViewRootImpl.java +0 −10 Original line number Diff line number Diff line Loading @@ -118,7 +118,6 @@ public final class ViewRootImpl implements ViewParent, * at 60 Hz. This can be used to measure the potential framerate. */ private static final String PROPERTY_PROFILE_RENDERING = "viewroot.profile_rendering"; private static final String PROPERTY_MEDIA_DISABLED = "config.disable_media"; // properties used by emulator to determine display shape public static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular"; Loading Loading @@ -301,8 +300,6 @@ public final class ViewRootImpl implements ViewParent, private Choreographer.FrameCallback mRenderProfiler; private boolean mRenderProfilingEnabled; private boolean mMediaDisabled; // Variables to track frames per second, enabled via DEBUG_FPS flag private long mFpsStartTime = -1; private long mFpsPrevTime = -1; Loading Loading @@ -5360,10 +5357,6 @@ public final class ViewRootImpl implements ViewParent, public void playSoundEffect(int effectId) { checkThread(); if (mMediaDisabled) { return; } try { final AudioManager audioManager = getAudioManager(); Loading Loading @@ -5570,9 +5563,6 @@ public final class ViewRootImpl implements ViewParent, mProfileRendering = SystemProperties.getBoolean(PROPERTY_PROFILE_RENDERING, false); profileRendering(mAttachInfo.mHasWindowFocus); // Media (used by sound effects) mMediaDisabled = SystemProperties.getBoolean(PROPERTY_MEDIA_DISABLED, false); // Hardware rendering if (mAttachInfo.mHardwareRenderer != null) { if (mAttachInfo.mHardwareRenderer.loadSystemProperties()) { Loading media/java/android/media/SoundPool.java +181 −410 File changed.Preview size limit exceeded, changes collapsed. Show changes media/jni/soundpool/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ android_media_SoundPool_SoundPoolImpl.cpp \ android_media_SoundPool.cpp \ SoundPool.cpp \ SoundPoolThread.cpp Loading media/jni/soundpool/android_media_SoundPool_SoundPoolImpl.cpp→media/jni/soundpool/android_media_SoundPool.cpp +45 −45 Original line number Diff line number Diff line Loading @@ -47,10 +47,10 @@ static audio_attributes_fields_t javaAudioAttrFields; // ---------------------------------------------------------------------------- static jint android_media_SoundPool_SoundPoolImpl_load_FD(JNIEnv *env, jobject thiz, jobject fileDescriptor, android_media_SoundPool_load_FD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length, jint priority) { ALOGV("android_media_SoundPool_SoundPoolImpl_load_FD"); ALOGV("android_media_SoundPool_load_FD"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return 0; return (jint) ap->load(jniGetFDFromFileDescriptor(env, fileDescriptor), Loading @@ -58,104 +58,104 @@ android_media_SoundPool_SoundPoolImpl_load_FD(JNIEnv *env, jobject thiz, jobject } static jboolean android_media_SoundPool_SoundPoolImpl_unload(JNIEnv *env, jobject thiz, jint sampleID) { ALOGV("android_media_SoundPool_SoundPoolImpl_unload\n"); android_media_SoundPool_unload(JNIEnv *env, jobject thiz, jint sampleID) { ALOGV("android_media_SoundPool_unload\n"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return JNI_FALSE; return ap->unload(sampleID) ? JNI_TRUE : JNI_FALSE; } static jint android_media_SoundPool_SoundPoolImpl_play(JNIEnv *env, jobject thiz, jint sampleID, android_media_SoundPool_play(JNIEnv *env, jobject thiz, jint sampleID, jfloat leftVolume, jfloat rightVolume, jint priority, jint loop, jfloat rate) { ALOGV("android_media_SoundPool_SoundPoolImpl_play\n"); ALOGV("android_media_SoundPool_play\n"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return 0; return (jint) ap->play(sampleID, leftVolume, rightVolume, priority, loop, rate); } static void android_media_SoundPool_SoundPoolImpl_pause(JNIEnv *env, jobject thiz, jint channelID) android_media_SoundPool_pause(JNIEnv *env, jobject thiz, jint channelID) { ALOGV("android_media_SoundPool_SoundPoolImpl_pause"); ALOGV("android_media_SoundPool_pause"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->pause(channelID); } static void android_media_SoundPool_SoundPoolImpl_resume(JNIEnv *env, jobject thiz, jint channelID) android_media_SoundPool_resume(JNIEnv *env, jobject thiz, jint channelID) { ALOGV("android_media_SoundPool_SoundPoolImpl_resume"); ALOGV("android_media_SoundPool_resume"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->resume(channelID); } static void android_media_SoundPool_SoundPoolImpl_autoPause(JNIEnv *env, jobject thiz) android_media_SoundPool_autoPause(JNIEnv *env, jobject thiz) { ALOGV("android_media_SoundPool_SoundPoolImpl_autoPause"); ALOGV("android_media_SoundPool_autoPause"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->autoPause(); } static void android_media_SoundPool_SoundPoolImpl_autoResume(JNIEnv *env, jobject thiz) android_media_SoundPool_autoResume(JNIEnv *env, jobject thiz) { ALOGV("android_media_SoundPool_SoundPoolImpl_autoResume"); ALOGV("android_media_SoundPool_autoResume"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->autoResume(); } static void android_media_SoundPool_SoundPoolImpl_stop(JNIEnv *env, jobject thiz, jint channelID) android_media_SoundPool_stop(JNIEnv *env, jobject thiz, jint channelID) { ALOGV("android_media_SoundPool_SoundPoolImpl_stop"); ALOGV("android_media_SoundPool_stop"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->stop(channelID); } static void android_media_SoundPool_SoundPoolImpl_setVolume(JNIEnv *env, jobject thiz, jint channelID, android_media_SoundPool_setVolume(JNIEnv *env, jobject thiz, jint channelID, jfloat leftVolume, jfloat rightVolume) { ALOGV("android_media_SoundPool_SoundPoolImpl_setVolume"); ALOGV("android_media_SoundPool_setVolume"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->setVolume(channelID, (float) leftVolume, (float) rightVolume); } static void android_media_SoundPool_SoundPoolImpl_setPriority(JNIEnv *env, jobject thiz, jint channelID, android_media_SoundPool_setPriority(JNIEnv *env, jobject thiz, jint channelID, jint priority) { ALOGV("android_media_SoundPool_SoundPoolImpl_setPriority"); ALOGV("android_media_SoundPool_setPriority"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->setPriority(channelID, (int) priority); } static void android_media_SoundPool_SoundPoolImpl_setLoop(JNIEnv *env, jobject thiz, jint channelID, android_media_SoundPool_setLoop(JNIEnv *env, jobject thiz, jint channelID, int loop) { ALOGV("android_media_SoundPool_SoundPoolImpl_setLoop"); ALOGV("android_media_SoundPool_setLoop"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->setLoop(channelID, loop); } static void android_media_SoundPool_SoundPoolImpl_setRate(JNIEnv *env, jobject thiz, jint channelID, android_media_SoundPool_setRate(JNIEnv *env, jobject thiz, jint channelID, jfloat rate) { ALOGV("android_media_SoundPool_SoundPoolImpl_setRate"); ALOGV("android_media_SoundPool_setRate"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->setRate(channelID, (float) rate); Loading @@ -169,7 +169,7 @@ static void android_media_callback(SoundPoolEvent event, SoundPool* soundPool, v } static jint android_media_SoundPool_SoundPoolImpl_native_setup(JNIEnv *env, jobject thiz, jobject weakRef, android_media_SoundPool_native_setup(JNIEnv *env, jobject thiz, jobject weakRef, jint maxChannels, jobject jaa) { if (jaa == 0) { Loading @@ -191,7 +191,7 @@ android_media_SoundPool_SoundPoolImpl_native_setup(JNIEnv *env, jobject thiz, jo (audio_content_type_t) env->GetIntField(jaa, javaAudioAttrFields.fieldContentType); paa->flags = env->GetIntField(jaa, javaAudioAttrFields.fieldFlags); ALOGV("android_media_SoundPool_SoundPoolImpl_native_setup"); ALOGV("android_media_SoundPool_native_setup"); SoundPool *ap = new SoundPool(maxChannels, paa); if (ap == NULL) { return -1; Loading @@ -211,9 +211,9 @@ android_media_SoundPool_SoundPoolImpl_native_setup(JNIEnv *env, jobject thiz, jo } static void android_media_SoundPool_SoundPoolImpl_release(JNIEnv *env, jobject thiz) android_media_SoundPool_release(JNIEnv *env, jobject thiz) { ALOGV("android_media_SoundPool_SoundPoolImpl_release"); ALOGV("android_media_SoundPool_release"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap != NULL) { Loading @@ -236,63 +236,63 @@ android_media_SoundPool_SoundPoolImpl_release(JNIEnv *env, jobject thiz) static JNINativeMethod gMethods[] = { { "_load", "(Ljava/io/FileDescriptor;JJI)I", (void *)android_media_SoundPool_SoundPoolImpl_load_FD (void *)android_media_SoundPool_load_FD }, { "unload", "(I)Z", (void *)android_media_SoundPool_SoundPoolImpl_unload (void *)android_media_SoundPool_unload }, { "_play", "(IFFIIF)I", (void *)android_media_SoundPool_SoundPoolImpl_play (void *)android_media_SoundPool_play }, { "pause", "(I)V", (void *)android_media_SoundPool_SoundPoolImpl_pause (void *)android_media_SoundPool_pause }, { "resume", "(I)V", (void *)android_media_SoundPool_SoundPoolImpl_resume (void *)android_media_SoundPool_resume }, { "autoPause", "()V", (void *)android_media_SoundPool_SoundPoolImpl_autoPause (void *)android_media_SoundPool_autoPause }, { "autoResume", "()V", (void *)android_media_SoundPool_SoundPoolImpl_autoResume (void *)android_media_SoundPool_autoResume }, { "stop", "(I)V", (void *)android_media_SoundPool_SoundPoolImpl_stop (void *)android_media_SoundPool_stop }, { "_setVolume", "(IFF)V", (void *)android_media_SoundPool_SoundPoolImpl_setVolume (void *)android_media_SoundPool_setVolume }, { "setPriority", "(II)V", (void *)android_media_SoundPool_SoundPoolImpl_setPriority (void *)android_media_SoundPool_setPriority }, { "setLoop", "(II)V", (void *)android_media_SoundPool_SoundPoolImpl_setLoop (void *)android_media_SoundPool_setLoop }, { "setRate", "(IF)V", (void *)android_media_SoundPool_SoundPoolImpl_setRate (void *)android_media_SoundPool_setRate }, { "native_setup", "(Ljava/lang/Object;ILjava/lang/Object;)I", (void*)android_media_SoundPool_SoundPoolImpl_native_setup (void*)android_media_SoundPool_native_setup }, { "release", "()V", (void*)android_media_SoundPool_SoundPoolImpl_release (void*)android_media_SoundPool_release } }; static const char* const kClassPathName = "android/media/SoundPool$SoundPoolImpl"; static const char* const kClassPathName = "android/media/SoundPool"; jint JNI_OnLoad(JavaVM* vm, void* /* reserved */) { Loading @@ -314,14 +314,14 @@ jint JNI_OnLoad(JavaVM* vm, void* /* reserved */) fields.mNativeContext = env->GetFieldID(clazz, "mNativeContext", "J"); if (fields.mNativeContext == NULL) { ALOGE("Can't find SoundPoolImpl.mNativeContext"); ALOGE("Can't find SoundPool.mNativeContext"); return result; } fields.mPostEvent = env->GetStaticMethodID(clazz, "postEventFromNative", "(Ljava/lang/Object;IIILjava/lang/Object;)V"); if (fields.mPostEvent == NULL) { ALOGE("Can't find android/media/SoundPoolImpl.postEventFromNative"); ALOGE("Can't find android/media/SoundPool.postEventFromNative"); return result; } Loading services/java/com/android/server/SystemServer.java +19 −29 Original line number Diff line number Diff line Loading @@ -406,12 +406,9 @@ public final class SystemServer { AudioService audioService = null; MmsServiceBroker mmsService = null; EntropyMixer entropyMixer = null; MidiService midiService = null; boolean disableStorage = SystemProperties.getBoolean("config.disable_storage", false); boolean disableMedia = SystemProperties.getBoolean("config.disable_media", false); boolean disableBluetooth = SystemProperties.getBoolean("config.disable_bluetooth", false); boolean disableTelephony = SystemProperties.getBoolean("config.disable_telephony", false); boolean disableLocation = SystemProperties.getBoolean("config.disable_location", false); boolean disableSystemUI = SystemProperties.getBoolean("config.disable_systemui", false); boolean disableNonCoreServices = SystemProperties.getBoolean("config.disable_noncore", false); Loading Loading @@ -520,7 +517,6 @@ public final class SystemServer { LockSettingsService lockSettings = null; AssetAtlasService atlas = null; MediaRouterService mediaRouter = null; MidiService midi = null; // Bring up services needed for UI. if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) { Loading Loading @@ -792,7 +788,6 @@ public final class SystemServer { } } if (!disableMedia && !"0".equals(SystemProperties.get("system_init.startaudioservice"))) { try { Slog.i(TAG, "Audio Service"); audioService = new AudioService(context); Loading @@ -800,13 +795,11 @@ public final class SystemServer { } catch (Throwable e) { reportWtf("starting Audio Service", e); } } if (!disableNonCoreServices) { mSystemServiceManager.startService(DockObserver.class); } if (!disableMedia) { try { Slog.i(TAG, "Wired Accessory Manager"); // Listen for wired headset changes Loading @@ -815,7 +808,6 @@ public final class SystemServer { } catch (Throwable e) { reportWtf("starting WiredAccessoryManager", e); } } if (!disableNonCoreServices) { if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_USB_HOST) Loading Loading @@ -891,7 +883,6 @@ public final class SystemServer { } } if (!disableMedia) { try { Slog.i(TAG, "CommonTimeManagementService"); commonTimeMgmtService = new CommonTimeManagementService(context); Loading @@ -899,7 +890,6 @@ public final class SystemServer { } catch (Throwable e) { reportWtf("starting CommonTimeManagementService service", e); } } if (!disableNetwork) { try { Loading Loading
core/java/android/view/ViewRootImpl.java +0 −10 Original line number Diff line number Diff line Loading @@ -118,7 +118,6 @@ public final class ViewRootImpl implements ViewParent, * at 60 Hz. This can be used to measure the potential framerate. */ private static final String PROPERTY_PROFILE_RENDERING = "viewroot.profile_rendering"; private static final String PROPERTY_MEDIA_DISABLED = "config.disable_media"; // properties used by emulator to determine display shape public static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular"; Loading Loading @@ -301,8 +300,6 @@ public final class ViewRootImpl implements ViewParent, private Choreographer.FrameCallback mRenderProfiler; private boolean mRenderProfilingEnabled; private boolean mMediaDisabled; // Variables to track frames per second, enabled via DEBUG_FPS flag private long mFpsStartTime = -1; private long mFpsPrevTime = -1; Loading Loading @@ -5360,10 +5357,6 @@ public final class ViewRootImpl implements ViewParent, public void playSoundEffect(int effectId) { checkThread(); if (mMediaDisabled) { return; } try { final AudioManager audioManager = getAudioManager(); Loading Loading @@ -5570,9 +5563,6 @@ public final class ViewRootImpl implements ViewParent, mProfileRendering = SystemProperties.getBoolean(PROPERTY_PROFILE_RENDERING, false); profileRendering(mAttachInfo.mHasWindowFocus); // Media (used by sound effects) mMediaDisabled = SystemProperties.getBoolean(PROPERTY_MEDIA_DISABLED, false); // Hardware rendering if (mAttachInfo.mHardwareRenderer != null) { if (mAttachInfo.mHardwareRenderer.loadSystemProperties()) { Loading
media/java/android/media/SoundPool.java +181 −410 File changed.Preview size limit exceeded, changes collapsed. Show changes
media/jni/soundpool/Android.mk +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ android_media_SoundPool_SoundPoolImpl.cpp \ android_media_SoundPool.cpp \ SoundPool.cpp \ SoundPoolThread.cpp Loading
media/jni/soundpool/android_media_SoundPool_SoundPoolImpl.cpp→media/jni/soundpool/android_media_SoundPool.cpp +45 −45 Original line number Diff line number Diff line Loading @@ -47,10 +47,10 @@ static audio_attributes_fields_t javaAudioAttrFields; // ---------------------------------------------------------------------------- static jint android_media_SoundPool_SoundPoolImpl_load_FD(JNIEnv *env, jobject thiz, jobject fileDescriptor, android_media_SoundPool_load_FD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length, jint priority) { ALOGV("android_media_SoundPool_SoundPoolImpl_load_FD"); ALOGV("android_media_SoundPool_load_FD"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return 0; return (jint) ap->load(jniGetFDFromFileDescriptor(env, fileDescriptor), Loading @@ -58,104 +58,104 @@ android_media_SoundPool_SoundPoolImpl_load_FD(JNIEnv *env, jobject thiz, jobject } static jboolean android_media_SoundPool_SoundPoolImpl_unload(JNIEnv *env, jobject thiz, jint sampleID) { ALOGV("android_media_SoundPool_SoundPoolImpl_unload\n"); android_media_SoundPool_unload(JNIEnv *env, jobject thiz, jint sampleID) { ALOGV("android_media_SoundPool_unload\n"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return JNI_FALSE; return ap->unload(sampleID) ? JNI_TRUE : JNI_FALSE; } static jint android_media_SoundPool_SoundPoolImpl_play(JNIEnv *env, jobject thiz, jint sampleID, android_media_SoundPool_play(JNIEnv *env, jobject thiz, jint sampleID, jfloat leftVolume, jfloat rightVolume, jint priority, jint loop, jfloat rate) { ALOGV("android_media_SoundPool_SoundPoolImpl_play\n"); ALOGV("android_media_SoundPool_play\n"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return 0; return (jint) ap->play(sampleID, leftVolume, rightVolume, priority, loop, rate); } static void android_media_SoundPool_SoundPoolImpl_pause(JNIEnv *env, jobject thiz, jint channelID) android_media_SoundPool_pause(JNIEnv *env, jobject thiz, jint channelID) { ALOGV("android_media_SoundPool_SoundPoolImpl_pause"); ALOGV("android_media_SoundPool_pause"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->pause(channelID); } static void android_media_SoundPool_SoundPoolImpl_resume(JNIEnv *env, jobject thiz, jint channelID) android_media_SoundPool_resume(JNIEnv *env, jobject thiz, jint channelID) { ALOGV("android_media_SoundPool_SoundPoolImpl_resume"); ALOGV("android_media_SoundPool_resume"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->resume(channelID); } static void android_media_SoundPool_SoundPoolImpl_autoPause(JNIEnv *env, jobject thiz) android_media_SoundPool_autoPause(JNIEnv *env, jobject thiz) { ALOGV("android_media_SoundPool_SoundPoolImpl_autoPause"); ALOGV("android_media_SoundPool_autoPause"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->autoPause(); } static void android_media_SoundPool_SoundPoolImpl_autoResume(JNIEnv *env, jobject thiz) android_media_SoundPool_autoResume(JNIEnv *env, jobject thiz) { ALOGV("android_media_SoundPool_SoundPoolImpl_autoResume"); ALOGV("android_media_SoundPool_autoResume"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->autoResume(); } static void android_media_SoundPool_SoundPoolImpl_stop(JNIEnv *env, jobject thiz, jint channelID) android_media_SoundPool_stop(JNIEnv *env, jobject thiz, jint channelID) { ALOGV("android_media_SoundPool_SoundPoolImpl_stop"); ALOGV("android_media_SoundPool_stop"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->stop(channelID); } static void android_media_SoundPool_SoundPoolImpl_setVolume(JNIEnv *env, jobject thiz, jint channelID, android_media_SoundPool_setVolume(JNIEnv *env, jobject thiz, jint channelID, jfloat leftVolume, jfloat rightVolume) { ALOGV("android_media_SoundPool_SoundPoolImpl_setVolume"); ALOGV("android_media_SoundPool_setVolume"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->setVolume(channelID, (float) leftVolume, (float) rightVolume); } static void android_media_SoundPool_SoundPoolImpl_setPriority(JNIEnv *env, jobject thiz, jint channelID, android_media_SoundPool_setPriority(JNIEnv *env, jobject thiz, jint channelID, jint priority) { ALOGV("android_media_SoundPool_SoundPoolImpl_setPriority"); ALOGV("android_media_SoundPool_setPriority"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->setPriority(channelID, (int) priority); } static void android_media_SoundPool_SoundPoolImpl_setLoop(JNIEnv *env, jobject thiz, jint channelID, android_media_SoundPool_setLoop(JNIEnv *env, jobject thiz, jint channelID, int loop) { ALOGV("android_media_SoundPool_SoundPoolImpl_setLoop"); ALOGV("android_media_SoundPool_setLoop"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->setLoop(channelID, loop); } static void android_media_SoundPool_SoundPoolImpl_setRate(JNIEnv *env, jobject thiz, jint channelID, android_media_SoundPool_setRate(JNIEnv *env, jobject thiz, jint channelID, jfloat rate) { ALOGV("android_media_SoundPool_SoundPoolImpl_setRate"); ALOGV("android_media_SoundPool_setRate"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap == NULL) return; ap->setRate(channelID, (float) rate); Loading @@ -169,7 +169,7 @@ static void android_media_callback(SoundPoolEvent event, SoundPool* soundPool, v } static jint android_media_SoundPool_SoundPoolImpl_native_setup(JNIEnv *env, jobject thiz, jobject weakRef, android_media_SoundPool_native_setup(JNIEnv *env, jobject thiz, jobject weakRef, jint maxChannels, jobject jaa) { if (jaa == 0) { Loading @@ -191,7 +191,7 @@ android_media_SoundPool_SoundPoolImpl_native_setup(JNIEnv *env, jobject thiz, jo (audio_content_type_t) env->GetIntField(jaa, javaAudioAttrFields.fieldContentType); paa->flags = env->GetIntField(jaa, javaAudioAttrFields.fieldFlags); ALOGV("android_media_SoundPool_SoundPoolImpl_native_setup"); ALOGV("android_media_SoundPool_native_setup"); SoundPool *ap = new SoundPool(maxChannels, paa); if (ap == NULL) { return -1; Loading @@ -211,9 +211,9 @@ android_media_SoundPool_SoundPoolImpl_native_setup(JNIEnv *env, jobject thiz, jo } static void android_media_SoundPool_SoundPoolImpl_release(JNIEnv *env, jobject thiz) android_media_SoundPool_release(JNIEnv *env, jobject thiz) { ALOGV("android_media_SoundPool_SoundPoolImpl_release"); ALOGV("android_media_SoundPool_release"); SoundPool *ap = MusterSoundPool(env, thiz); if (ap != NULL) { Loading @@ -236,63 +236,63 @@ android_media_SoundPool_SoundPoolImpl_release(JNIEnv *env, jobject thiz) static JNINativeMethod gMethods[] = { { "_load", "(Ljava/io/FileDescriptor;JJI)I", (void *)android_media_SoundPool_SoundPoolImpl_load_FD (void *)android_media_SoundPool_load_FD }, { "unload", "(I)Z", (void *)android_media_SoundPool_SoundPoolImpl_unload (void *)android_media_SoundPool_unload }, { "_play", "(IFFIIF)I", (void *)android_media_SoundPool_SoundPoolImpl_play (void *)android_media_SoundPool_play }, { "pause", "(I)V", (void *)android_media_SoundPool_SoundPoolImpl_pause (void *)android_media_SoundPool_pause }, { "resume", "(I)V", (void *)android_media_SoundPool_SoundPoolImpl_resume (void *)android_media_SoundPool_resume }, { "autoPause", "()V", (void *)android_media_SoundPool_SoundPoolImpl_autoPause (void *)android_media_SoundPool_autoPause }, { "autoResume", "()V", (void *)android_media_SoundPool_SoundPoolImpl_autoResume (void *)android_media_SoundPool_autoResume }, { "stop", "(I)V", (void *)android_media_SoundPool_SoundPoolImpl_stop (void *)android_media_SoundPool_stop }, { "_setVolume", "(IFF)V", (void *)android_media_SoundPool_SoundPoolImpl_setVolume (void *)android_media_SoundPool_setVolume }, { "setPriority", "(II)V", (void *)android_media_SoundPool_SoundPoolImpl_setPriority (void *)android_media_SoundPool_setPriority }, { "setLoop", "(II)V", (void *)android_media_SoundPool_SoundPoolImpl_setLoop (void *)android_media_SoundPool_setLoop }, { "setRate", "(IF)V", (void *)android_media_SoundPool_SoundPoolImpl_setRate (void *)android_media_SoundPool_setRate }, { "native_setup", "(Ljava/lang/Object;ILjava/lang/Object;)I", (void*)android_media_SoundPool_SoundPoolImpl_native_setup (void*)android_media_SoundPool_native_setup }, { "release", "()V", (void*)android_media_SoundPool_SoundPoolImpl_release (void*)android_media_SoundPool_release } }; static const char* const kClassPathName = "android/media/SoundPool$SoundPoolImpl"; static const char* const kClassPathName = "android/media/SoundPool"; jint JNI_OnLoad(JavaVM* vm, void* /* reserved */) { Loading @@ -314,14 +314,14 @@ jint JNI_OnLoad(JavaVM* vm, void* /* reserved */) fields.mNativeContext = env->GetFieldID(clazz, "mNativeContext", "J"); if (fields.mNativeContext == NULL) { ALOGE("Can't find SoundPoolImpl.mNativeContext"); ALOGE("Can't find SoundPool.mNativeContext"); return result; } fields.mPostEvent = env->GetStaticMethodID(clazz, "postEventFromNative", "(Ljava/lang/Object;IIILjava/lang/Object;)V"); if (fields.mPostEvent == NULL) { ALOGE("Can't find android/media/SoundPoolImpl.postEventFromNative"); ALOGE("Can't find android/media/SoundPool.postEventFromNative"); return result; } Loading
services/java/com/android/server/SystemServer.java +19 −29 Original line number Diff line number Diff line Loading @@ -406,12 +406,9 @@ public final class SystemServer { AudioService audioService = null; MmsServiceBroker mmsService = null; EntropyMixer entropyMixer = null; MidiService midiService = null; boolean disableStorage = SystemProperties.getBoolean("config.disable_storage", false); boolean disableMedia = SystemProperties.getBoolean("config.disable_media", false); boolean disableBluetooth = SystemProperties.getBoolean("config.disable_bluetooth", false); boolean disableTelephony = SystemProperties.getBoolean("config.disable_telephony", false); boolean disableLocation = SystemProperties.getBoolean("config.disable_location", false); boolean disableSystemUI = SystemProperties.getBoolean("config.disable_systemui", false); boolean disableNonCoreServices = SystemProperties.getBoolean("config.disable_noncore", false); Loading Loading @@ -520,7 +517,6 @@ public final class SystemServer { LockSettingsService lockSettings = null; AssetAtlasService atlas = null; MediaRouterService mediaRouter = null; MidiService midi = null; // Bring up services needed for UI. if (mFactoryTestMode != FactoryTest.FACTORY_TEST_LOW_LEVEL) { Loading Loading @@ -792,7 +788,6 @@ public final class SystemServer { } } if (!disableMedia && !"0".equals(SystemProperties.get("system_init.startaudioservice"))) { try { Slog.i(TAG, "Audio Service"); audioService = new AudioService(context); Loading @@ -800,13 +795,11 @@ public final class SystemServer { } catch (Throwable e) { reportWtf("starting Audio Service", e); } } if (!disableNonCoreServices) { mSystemServiceManager.startService(DockObserver.class); } if (!disableMedia) { try { Slog.i(TAG, "Wired Accessory Manager"); // Listen for wired headset changes Loading @@ -815,7 +808,6 @@ public final class SystemServer { } catch (Throwable e) { reportWtf("starting WiredAccessoryManager", e); } } if (!disableNonCoreServices) { if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_USB_HOST) Loading Loading @@ -891,7 +883,6 @@ public final class SystemServer { } } if (!disableMedia) { try { Slog.i(TAG, "CommonTimeManagementService"); commonTimeMgmtService = new CommonTimeManagementService(context); Loading @@ -899,7 +890,6 @@ public final class SystemServer { } catch (Throwable e) { reportWtf("starting CommonTimeManagementService service", e); } } if (!disableNetwork) { try { Loading