From 086396a92408b47ee32f7fedaae9af533608ff6d Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Fri, 4 Feb 2011 16:17:50 -0800 Subject: Issue 3395734: fix media server restart detection Commit 25101b0b in AudioSystem for issue 3395734 broke the mechanism in AudioService to poll and detect the restarting of media server process after a crash. The fix consists in changing the method used to poll AudioSystem and trigger a callback indicating success when media server is responding (the method must be on IAudioFlinger and not IAudioService to trigger the callback). Change-Id: I843c0194de9cbf82c779cabbf2f3cbf8064603c8 --- media/java/android/media/AudioService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index e18220ac0f4b..6458e371fbd3 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -1940,7 +1940,7 @@ public class AudioService extends IAudioService.Stub { // Force creation of new IAudioflinger interface if (!mMediaServerOk) { Log.e(TAG, "Media server died."); - AudioSystem.isStreamActive(AudioSystem.STREAM_MUSIC, 0); + AudioSystem.isMicrophoneMuted(); sendMsg(mAudioHandler, MSG_MEDIA_SERVER_DIED, SHARED_MSG, SENDMSG_NOOP, 0, 0, null, 500); } -- cgit v1.2.3-59-g8ed1b