[Bugfix] Fix the issue where the spatializer available status could not be updated

When a device (such as a projection device) is connected, the spatializer available status should be updated regardless of whether this feature is turned on or not. Because other functions (such as the spatializer UI switch) need to change according to the spatializer available status.

Change-Id: I43d6d5d0ea4d69a0d4559390dcf34885b96bc488
Signed-off-by: xialei6 <xialei6@xiaomi.com>
diff --git a/services/core/java/com/android/server/audio/SpatializerHelper.java b/services/core/java/com/android/server/audio/SpatializerHelper.java
index 4f7f31d..5be2291 100644
--- a/services/core/java/com/android/server/audio/SpatializerHelper.java
+++ b/services/core/java/com/android/server/audio/SpatializerHelper.java
@@ -342,9 +342,6 @@
     //------------------------------------------------------
     // routing monitoring
     synchronized void onRoutingUpdated() {
-        if (!mFeatureEnabled) {
-            return;
-        }
         switch (mState) {
             case STATE_UNINITIALIZED:
             case STATE_NOT_SUPPORTED:
@@ -388,7 +385,7 @@
             setDispatchAvailableState(false);
         }
 
-        boolean enabled = able && enabledAvailable.first;
+        boolean enabled = mFeatureEnabled && able && enabledAvailable.first;
         if (enabled) {
             loglogi("Enabling Spatial Audio since enabled for media device:"
                     + currentDevice);