[Android Software Development] fedevd:
If I lock screen while i'm playing music, the music just stops. I can't even use the lockscreen music controls. Here's the log:

I/BootReceiver( 2027): Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)

W/AudioSystem( 2027): AudioFlinger server died!

I/ServiceManager( 1716): service 'media.audio_flinger' died

I/ServiceManager( 1716): service 'media.player' died

I/ServiceManager( 1716): service 'media.camera' died

I/ServiceManager( 1716): service 'media.audio_policy' died

W/AudioSystem( 2027): AudioPolicyService server died!

E/miui.util.AudioOutputHelper( 2027): android.os.DeadObjectException

D/com.miui.player.receiver.MediaButtonIntentReceiver( 3789): handle action:android.intent.action.MEDIA_BUTTON

D/com.miui.player.receiver.MediaButtonIntentReceiver( 3789): action = 0, repeatCount = 0, command = togglepause

W/System.err( 2027): java.lang.NullPointerException

W/System.err( 2027): at miui.util.AudioOutputHelper.parseAudioFlingerDumpInternal(AudioOutputHelper.java:176)

W/System.err( 2027): at miui.util.AudioOutputHelper.parseAudioFlingerDump(AudioOutputHelper.java:166)

W/System.err( 2027): at miui.util.AudioOutputHelper.getActiveClientNameList(AudioOutputHelper.java:280)

W/System.err( 2027): at com.android.server.am.ExtraActivityManagerService.adjustMediaButtonReceivers(ExtraActivityManagerService.java:31)

W/System.err( 2027): at com.android.server.am.ExtraActivityManagerService.adjustMediaButtonReceivers(ExtraActivityManagerService.java:18)

W/System.err( 2027): at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:13189)

W/System.err( 2027): at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:13253)

W/System.err( 2027): at android.app.ContextImpl.sendOrderedBroadcast(ContextImpl.java:1009)

W/System.err( 2027): at android.content.ContextWrapper.sendOrderedBroadcast(ContextWrapper.java:329)

W/System.err( 2027): at miui.app.screenelement.elements.MusicControlScreenElement.sendMediaButtonBroadcast(MusicControlScreenElement.java:501)

W/System.err( 2027): at miui.app.screenelement.elements.MusicControlScreenElement.onButtonUp(MusicControlScreenElement.java:447)

W/System.err( 2027): at miui.app.screenelement.elements.ButtonScreenElement.onTouch(ButtonScreenElement.java:153)

W/System.err( 2027): at miui.app.screenelement.elements.ElementGroup.onTouch(ElementGroup.java:139)

W/System.err( 2027): at miui.app.screenelement.elements.ElementGroup.onTouch(ElementGroup.java:139)

W/System.err( 2027): at miui.app.screenelement.ScreenElementRoot.onTouch(ScreenElementRoot.java:276)

W/System.err( 2027): at com.miui.internal.policy.impl.AwesomeLockScreenImp.LockScreenRoot.onTouch(LockScreenRoot.java:95)

W/System.err( 2027): at miui.app.screenelement.MiAdvancedView.onTouch(MiAdvancedView.java:209)

W/System.err( 2027): at miui.app.screenelement.RendererController.onTouch(RendererController.java:189)

W/System.err( 2027): at miui.app.screenelement.RenderThread.run(RenderThread.java:153)

E/MiAdvancedView( 2027): java.lang.NullPointerException

D/FramerateTokenList( 2027): requestFramerate: 0.0 by:miui.app.screenelement.elements.FramerateController@41b71870

D/FramerateTokenList( 2027): requestFramerate: 0.0 by:miui.app.screenelement.elements.FramerateController@41b7edd0

W/System.err( 2027): java.lang.NullPointerException

W/System.err( 2027): at miui.util.AudioOutputHelper.parseAudioFlingerDumpInternal(AudioOutputHelper.java:176)

W/System.err( 2027): at miui.util.AudioOutputHelper.parseAudioFlingerDump(AudioOutputHelper.java:166)

W/System.err( 2027): at miui.util.AudioOutputHelper.getActiveClientNameList(AudioOutputHelper.java:280)

W/System.err( 2027): at com.android.server.am.ExtraActivityManagerService.adjustMediaButtonReceivers(ExtraActivityManagerService.java:31)

W/System.err( 2027): at com.android.server.am.ExtraActivityManagerService.adjustMediaButtonReceivers(ExtraActivityManagerService.java:18)

W/System.err( 2027): at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:13189)

W/System.err( 2027): at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:13253)

W/System.err( 2027): at android.app.ContextImpl.sendOrderedBroadcast(ContextImpl.java:1009)

W/System.err( 2027): at android.content.ContextWrapper.sendOrderedBroadcast(ContextWrapper.java:329)

W/System.err( 2027): at miui.app.screenelement.elements.MusicControlScreenElement.sendMediaButtonBroadcast(MusicControlScreenElement.java:501)

W/System.err( 2027): at miui.app.screenelement.elements.MusicControlScreenElement.onButtonDown(MusicControlScreenElement.java:385)

W/System.err( 2027): at miui.app.screenelement.elements.ButtonScreenElement.onTouch(ButtonScreenElement.java:120)

W/System.err( 2027): at miui.app.screenelement.elements.ElementGroup.onTouch(ElementGroup.java:139)

W/System.err( 2027): at miui.app.screenelement.elements.ElementGroup.onTouch(ElementGroup.java:139)

W/System.err( 2027): at miui.app.screenelement.ScreenElementRoot.onTouch(ScreenElementRoot.java:276)

W/System.err( 2027): at com.miui.internal.policy.impl.AwesomeLockScreenImp.LockScreenRoot.onTouch(LockScreenRoot.java:95)

W/System.err( 2027): at miui.app.screenelement.MiAdvancedView.onTouch(MiAdvancedView.java:209)

W/System.err( 2027): at miui.app.screenelement.RendererController.onTouch(RendererController.java:189)

W/System.err( 2027): at miui.app.screenelement.RenderThread.run(RenderThread.java:153)

E/MiAdvancedView( 2027): java.lang.NullPointerException

W/System.err( 2027): java.lang.NullPointerException

W/System.err( 2027): at miui.util.AudioOutputHelper.parseAudioFlingerDumpInternal(AudioOutputHelper.java:176)

W/System.err( 2027): at miui.util.AudioOutputHelper.parseAudioFlingerDump(AudioOutputHelper.java:166)

W/System.err( 2027): at miui.util.AudioOutputHelper.getActiveClientNameList(AudioOutputHelper.java:280)

W/System.err( 2027): at com.android.server.am.ExtraActivityManagerService.adjustMediaButtonReceivers(ExtraActivityManagerService.java:31)

W/System.err( 2027): at com.android.server.am.ExtraActivityManagerService.adjustMediaButtonReceivers(ExtraActivityManagerService.java:18)

W/System.err( 2027): at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:13189)

W/System.err( 2027): at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:13253)

W/System.err( 2027): at android.app.ContextImpl.sendOrderedBroadcast(ContextImpl.java:1009)

W/System.err( 2027): at android.content.ContextWrapper.sendOrderedBroadcast(ContextWrapper.java:329)

W/System.err( 2027): at miui.app.screenelement.elements.MusicControlScreenElement.sendMediaButtonBroadcast(MusicControlScreenElement.java:501)

W/System.err( 2027): at miui.app.screenelement.elements.MusicControlScreenElement.onButtonUp(MusicControlScreenElement.java:447)

W/System.err( 2027): at miui.app.screenelement.elements.ButtonScreenElement.onTouch(ButtonScreenElement.java:153)

W/System.err( 2027): at miui.app.screenelement.elements.ElementGroup.onTouch(ElementGroup.java:139)

W/System.err( 2027): at miui.app.screenelement.elements.ElementGroup.onTouch(ElementGroup.java:139)

W/System.err( 2027): at miui.app.screenelement.ScreenElementRoot.onTouch(ScreenElementRoot.java:276)

W/System.err( 2027): at com.miui.internal.policy.impl.AwesomeLockScreenImp.LockScreenRoot.onTouch(LockScreenRoot.java:95)

W/System.err( 2027): at miui.app.screenelement.MiAdvancedView.onTouch(MiAdvancedView.java:209)

W/System.err( 2027): at miui.app.screenelement.RendererController.onTouch(RendererController.java:189)

W/System.err( 2027): at miui.app.screenelement.RenderThread.run(RenderThread.java:153)

E/MiAdvancedView( 2027): java.lang.NullPointerException

I/ServiceManager( 2027): Waiting for service media.audio_policy...

E/AudioService( 2027): Media server died.

I/ServiceManager( 2027): Waiting for service media.audio_policy...

D/FramerateTokenList( 2027): requestFramerate: 20.0 by:miui.app.screenelement.elements.FramerateController@41b7edd0

How can I fix it?