SpatializerHelper: fix sensor reinitialization

Force reinitializing the sensors if the headtracking is enabled
for a given device and headtracker is not available.

Bug: 244430716
Test: repro steps in bug
Change-Id: Ic16f5be105ae5a95217bf55c2b454fbbbea54893
This commit is contained in:
Eric Laurent
2022-08-31 18:28:25 +02:00
parent 313aae1ef2
commit c0728d6887

View File

@@ -1115,6 +1115,9 @@ public class SpatializerHelper {
&& ROUTING_DEVICES[0].getAddress().equals(ada.getAddress())) {
setDesiredHeadTrackingMode(enabled ? mDesiredHeadTrackingModeWhenEnabled
: Spatializer.HEAD_TRACKING_MODE_DISABLED);
if (enabled && !mHeadTrackerAvailable) {
postInitSensors();
}
}
}