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

Commit 5a825654 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Automerger Merge Worker
Browse files

Merge "AudioService: initialize sensors if head tracking supported" into...

Merge "AudioService: initialize sensors if head tracking supported" into sc-v2-dev am: ee5419c3 am: d687893c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16017457

Change-Id: Ief88e90cb5fe0925db51187251f6ac94b113a74c
parents 5bb9630e d687893c
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -825,9 +825,18 @@ public class SpatializerHelper {
    }

    synchronized void onInitSensors(boolean init) {
        final int[] modes = getSupportedHeadTrackingModes();
        if (modes.length == 0) {
            Log.i(TAG, "not initializing sensors, no headtracking supported");
        final String action = init ? "initializing" : "releasing";
        if (mSpat == null) {
            Log.e(TAG, "not " + action + " sensors, null spatializer");
            return;
        }
        try {
            if (!mSpat.isHeadTrackingSupported()) {
                Log.e(TAG, "not " + action + " sensors, spatializer doesn't support headtracking");
                return;
            }
        } catch (RemoteException e) {
            Log.e(TAG, "not " + action + " sensors, error querying headtracking", e);
            return;
        }
        initSensors(init);