diff options
Diffstat (limited to 'src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java')
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index cc6437627..60425e484 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -121,6 +121,7 @@ public class VoicemailPlaybackPresenter */ private final AtomicInteger mDuration = new AtomicInteger(0); + private Activity mActivity; private Context mContext; private PlaybackView mView; private static MediaPlayer mMediaPlayer; @@ -147,11 +148,14 @@ public class VoicemailPlaybackPresenter private PowerManager.WakeLock mProximityWakeLock; private AudioManager mAudioManager; - public VoicemailPlaybackPresenter(Context context, Bundle savedInstanceState) { - mContext = context; + public VoicemailPlaybackPresenter(Activity activity, Bundle savedInstanceState) { + mActivity = activity; + mContext = activity; mAsyncTaskExecutor = AsyncTaskExecutors.createAsyncTaskExecutor(); mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); + mActivity.setVolumeControlStream(VoicemailPlaybackPresenter.PLAYBACK_STREAM); + if (savedInstanceState != null) { // Restores playback state when activity is recreated, such as after rotation. mVoicemailUri = (Uri) savedInstanceState.getParcelable(VOICEMAIL_URI_KEY); |