packages/apps/Mms/src/com/android/mms/ui/ComposeMessageActivity.java
private void play() {
+ AudioManager am = (AudioManager)getSystemService(AUDIO_SERVICE);
+ am.requestAudioFocus(mAudioFocusChangeListener,AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
mMediaPlayer.start();
mHandler.post(mUpdateThread);
mPlayPauseDrawable = getResources().getDrawable(R.drawable.audio_pause).mutate();
public void pause() {
+ AudioManager am = (AudioManager)getSystemService(AUDIO_SERVICE);
+ am.abandonAudioFocus(mAudioFocusChangeListener);
mMediaPlayer.pause();
mPlayPauseDrawable = getResources().getDrawable(R.drawable.audio_play).mutate();
mPlayPauseDrawable.setTint(mColor);
+ private Aud