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 committed by Andy Hung
parent a36a023dae
commit b73e3b550e

View File

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