From d0703d15d5032368f913aa476621a1bbe2affcc0 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Mon, 24 Oct 2022 16:31:50 -0700 Subject: Request audio focus on changing channel. `setVolumeByAudioFocus` doesn't actually take focus back in case we lose it while in the middle of playing TV. This can happen when a TIAS requests focus while a TV program is playing. `requestAudioFocus` will attempt to grab focus from the audio manager, while also calling `setVolumeByAudioFocus` at the end. Bug: 241110408 Test: Cuttlefish Change-Id: I5df860a351554a5a5b4ac18c8693d5531c85b816 --- src/com/android/tv/MainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/com') diff --git a/src/com/android/tv/MainActivity.java b/src/com/android/tv/MainActivity.java index 1383ca89..8fc7fb50 100644 --- a/src/com/android/tv/MainActivity.java +++ b/src/com/android/tv/MainActivity.java @@ -1101,7 +1101,7 @@ public class MainActivity extends Activity } mTvView.start(); - mAudioManagerHelper.setVolumeByAudioFocusStatus(); + mAudioManagerHelper.requestAudioFocus(); tune(true); } -- cgit v1.2.3