Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3815d85e authored by Eric Laurent's avatar Eric Laurent
Browse files

Spatializer: update getSupportedHeadTrackingModes()

ISpatializer.getSupportedHeadTrackingModes() result is now
independent from actually connected sensors and reflects the
capabilities when sensors are available.
Also do not report screen relative mode as this is currently not
supported by the head tracking library implementation.

Bug: 231252067
Test: make
Change-Id: I0b8be86b5c720024c342911accc580c1aba4f82e
parent 91bd1193
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -57,8 +57,10 @@ interface ISpatializer {
    boolean isHeadTrackingSupported();

    /** Reports the list of supported head tracking modes (see SpatializerHeadTrackingMode.aidl).
     * The list can be empty if the spatializer implementation does not support head tracking or if
     * no head tracking sensor is registered (see setHeadSensor() and setScreenSensor()).
     * The list always contains SpatializerHeadTrackingMode.DISABLED and can include other modes
     * if the spatializer effect implementation supports head tracking.
     * The result does not depend on currently connected sensors but reflects the capabilities
     * when sensors are available.
     */
    SpatializerHeadTrackingMode[] getSupportedHeadTrackingModes();

+1 −6
Original line number Diff line number Diff line
@@ -342,12 +342,7 @@ Status Spatializer::getSupportedHeadTrackingModes(

    modes->push_back(SpatializerHeadTrackingMode::DISABLED);
    if (mSupportsHeadTracking) {
        if (mHeadSensor != SpatializerPoseController::INVALID_SENSOR) {
        modes->push_back(SpatializerHeadTrackingMode::RELATIVE_WORLD);
            if (mScreenSensor != SpatializerPoseController::INVALID_SENSOR) {
                modes->push_back(SpatializerHeadTrackingMode::RELATIVE_SCREEN);
            }
        }
    }
    return Status::ok();
}