Skip to content
Snippets Groups Projects
Commit 5b83d77f authored by Mingbo Zhang's avatar Mingbo Zhang Committed by Gerrit - the friendly Code Review server
Browse files

pause cmd behaves like audiofocus loss

when fm audio is routed to a2dp, then video is started
to play. fm will receive pause cmd, and call fmOperationsOff,
then call resetAudioRoute(). audio output will be changed to
wired headset. We should keep audio route unchanged.

Change-Id: I42a15fea24ed26bfe7460a4611bca1a7620de4e1
CRs-Fixed: 1109351
parent e579ce10
No related branches found
No related tags found
No related merge requests found
......@@ -742,8 +742,10 @@ public class FMRadioService extends Service
Log.d(LOGTAG, "Music Service command : "+cmd+ " received");
if (cmd != null && cmd.equals("pause")) {
if (isFmOn()) {
fmOperationsOff();
mStoppedOnFocusLoss = true;
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
audioManager.abandonAudioFocus(mAudioFocusListener);
mDelayedStopHandler.obtainMessage(FOCUSCHANGE, AudioManager.AUDIOFOCUS_LOSS, 0).sendToTarget();
if (isOrderedBroadcast()) {
abortBroadcast();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment