aboutsummaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorDavid Zhao <qingxun@google.com>2022-10-24 16:31:50 -0700
committerDavid Zhao <qingxun@google.com>2022-10-26 00:28:11 +0000
commitd0703d15d5032368f913aa476621a1bbe2affcc0 (patch)
tree0db25b4b74f1e16ef9d91f08e83854d8fb27d327 /src/com
parentf43ec1dfbb2cf61e8f7db40dd9a14d64f62c0564 (diff)
downloadTV-d0703d15d5032368f913aa476621a1bbe2affcc0.tar.gz
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
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/tv/MainActivity.java2
1 files changed, 1 insertions, 1 deletions
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);
}