summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andy Hung <hunga@google.com> 2023-03-16 16:32:08 -0700
committer Andy Hung <hunga@google.com> 2023-03-16 16:32:08 -0700
commit0ea3e2b94a6d236886321d8c0135944373043d9c (patch)
tree7c601b38bc275ec8c1db9ee9e448be2048e48eb6
parent85bc59b92602146e16d52d5ff7389fa956a00cce (diff)
AudioService: RotationHelper.forceUpdate fix
All access to RotationHelper from AudioService must be guarded by a mMonitorRotation if check. Test: atest VtsHalAudioCoreTargetTest Bug: 273800157 Change-Id: I3cb4d30efbdab98d078e68a8ac6a85faee2dd8d9
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 72054fd8c5c0..ff18167ee86f 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -1731,7 +1731,9 @@ public class AudioService extends IAudioService.Stub
mSpatializerHelper.reset(/* featureEnabled */ mHasSpatializerEffect);
// Restore rotation information.
- RotationHelper.forceUpdate();
+ if (mMonitorRotation) {
+ RotationHelper.forceUpdate();
+ }
onIndicateSystemReady();
// indicate the end of reconfiguration phase to audio HAL