Chromium Code Reviews

Unified Diff: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java

Issue 1180253002: Chromecast: unmute audio stream on Cast session finish on pre-M devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CastShellActivity: use "this" instead of getApplicationContext Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastAudioManager.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java
index 2d70a754a61458cba91f9b928c354ccc7298e15d..be28e45380a85aab42fb934c88269dae255166a1 100644
--- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java
+++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastShellActivity.java
@@ -11,6 +11,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.media.AudioManager;
import android.net.Uri;
+import android.os.Build;
import android.os.Bundle;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
@@ -171,6 +172,14 @@ public class CastShellActivity extends Activity {
// As soon as the cast app is no longer in the foreground, we ought to immediately tear
// everything down.
finishGracefully();
+
+ // On pre-M devices, the device should be "unmuted" at the end of a Cast application
+ // session, signaled by the activity exiting. See b/19964892.
+ if (Build.VERSION.SDK_INT < 23) {
+ // Note: this is a no-op on fixed-volume devices.
+ CastAudioManager.getAudioManager(this)
+ .setStreamMute(AudioManager.STREAM_MUSIC, false);
+ }
}
super.onStop();
« no previous file with comments | « chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastAudioManager.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine