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
This commit is contained in:
Andy Hung
2023-03-16 16:32:08 -07:00
parent 85bc59b926
commit 0ea3e2b94a

View File

@@ -1731,7 +1731,9 @@ public class AudioService extends IAudioService.Stub
mSpatializerHelper.reset(/* featureEnabled */ mHasSpatializerEffect); mSpatializerHelper.reset(/* featureEnabled */ mHasSpatializerEffect);
// Restore rotation information. // Restore rotation information.
if (mMonitorRotation) {
RotationHelper.forceUpdate(); RotationHelper.forceUpdate();
}
onIndicateSystemReady(); onIndicateSystemReady();
// indicate the end of reconfiguration phase to audio HAL // indicate the end of reconfiguration phase to audio HAL