Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1567)

Unified Diff: content/browser/media/session/audio_focus_delegate_android.cc

Issue 2613143003: [MediaSession] Keep MediaSession controllable when losing audio focus (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/session/audio_focus_delegate_android.cc
diff --git a/content/browser/media/session/audio_focus_delegate_android.cc b/content/browser/media/session/audio_focus_delegate_android.cc
index dfaba7d1588f001685927deaef243d030285d94d..ae8e42578354ec0ed73a77e0a962959d623e8b79 100644
--- a/content/browser/media/session/audio_focus_delegate_android.cc
+++ b/content/browser/media/session/audio_focus_delegate_android.cc
@@ -61,11 +61,9 @@ void AudioFocusDelegateAndroid::OnSuspend(JNIEnv*,
if (!media_session_->IsActive())
return;
- if (temporary) {
- media_session_->Suspend(MediaSession::SuspendType::SYSTEM);
- } else {
- media_session_->Stop(MediaSession::SuspendType::SYSTEM);
mlamouri (slow - plz ping) 2017/01/09 14:33:37 Do we still use `Stop()` somewhere?
Zhiqiang Zhang (Slow) 2017/01/09 18:11:59 Yes, but Stop() is now only called with SuspendTyp
- }
+ // Suspending the session instead of stopping regardless of |temporary| to
mlamouri (slow - plz ping) 2017/01/09 14:33:37 Could you remove `temporary` from the method if it
Zhiqiang Zhang (Slow) 2017/01/09 18:11:59 Done.
+ // keep the session controllable.
+ media_session_->Suspend(MediaSession::SuspendType::SYSTEM);
}
void AudioFocusDelegateAndroid::OnResume(JNIEnv*,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698