Loading media/java/android/media/AudioService.java +3 −2 Original line number Diff line number Diff line Loading @@ -1945,10 +1945,11 @@ public class AudioService extends IAudioService.Stub { break; case MSG_MEDIA_SERVER_DIED: // Force creation of new IAudioflinger interface if (!mMediaServerOk) { Log.e(TAG, "Media server died."); AudioSystem.isMicrophoneMuted(); // Force creation of new IAudioFlinger interface so that we are notified // when new media_server process is back to life. AudioSystem.setErrorCallback(mAudioSystemCallback); sendMsg(mAudioHandler, MSG_MEDIA_SERVER_DIED, SHARED_MSG, SENDMSG_NOOP, 0, 0, null, 500); } Loading media/java/android/media/AudioSystem.java +16 −3 Original line number Diff line number Diff line Loading @@ -218,13 +218,26 @@ public class AudioSystem */ public static void setErrorCallback(ErrorCallback cb) { synchronized (AudioSystem.class) { mErrorCallback = cb; } // Calling a method on AudioFlinger here makes sure that we bind to IAudioFlinger // binder interface death. Not doing that would result in not being notified of // media_server process death if no other method is called on AudioSystem that reaches // to AudioFlinger. isMicrophoneMuted(); } private static void errorCallbackFromNative(int error) { ErrorCallback errorCallback = null; synchronized (AudioSystem.class) { if (mErrorCallback != null) { mErrorCallback.onError(error); errorCallback = mErrorCallback; } } if (errorCallback != null) { errorCallback.onError(error); } } Loading Loading
media/java/android/media/AudioService.java +3 −2 Original line number Diff line number Diff line Loading @@ -1945,10 +1945,11 @@ public class AudioService extends IAudioService.Stub { break; case MSG_MEDIA_SERVER_DIED: // Force creation of new IAudioflinger interface if (!mMediaServerOk) { Log.e(TAG, "Media server died."); AudioSystem.isMicrophoneMuted(); // Force creation of new IAudioFlinger interface so that we are notified // when new media_server process is back to life. AudioSystem.setErrorCallback(mAudioSystemCallback); sendMsg(mAudioHandler, MSG_MEDIA_SERVER_DIED, SHARED_MSG, SENDMSG_NOOP, 0, 0, null, 500); } Loading
media/java/android/media/AudioSystem.java +16 −3 Original line number Diff line number Diff line Loading @@ -218,13 +218,26 @@ public class AudioSystem */ public static void setErrorCallback(ErrorCallback cb) { synchronized (AudioSystem.class) { mErrorCallback = cb; } // Calling a method on AudioFlinger here makes sure that we bind to IAudioFlinger // binder interface death. Not doing that would result in not being notified of // media_server process death if no other method is called on AudioSystem that reaches // to AudioFlinger. isMicrophoneMuted(); } private static void errorCallbackFromNative(int error) { ErrorCallback errorCallback = null; synchronized (AudioSystem.class) { if (mErrorCallback != null) { mErrorCallback.onError(error); errorCallback = mErrorCallback; } } if (errorCallback != null) { errorCallback.onError(error); } } Loading