diff options
| author | 2024-05-06 10:53:27 +0800 | |
|---|---|---|
| committer | 2024-05-14 03:15:03 +0000 | |
| commit | 3a8f2e017a56c0dfc1b840537b94ed9bfef75eef (patch) | |
| tree | 3daf37dde8550f13cff7170cd3bff9b28aff76f1 | |
| parent | 2536ea06a426182c51aa31c78091aa24dbad183a (diff) | |
[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>
| -rw-r--r-- | services/core/java/com/android/server/audio/SpatializerHelper.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/audio/SpatializerHelper.java b/services/core/java/com/android/server/audio/SpatializerHelper.java index 4f7f31dfa7dc..5be2291ff056 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 @@ public class SpatializerHelper { //------------------------------------------------------ // routing monitoring synchronized void onRoutingUpdated() { - if (!mFeatureEnabled) { - return; - } switch (mState) { case STATE_UNINITIALIZED: case STATE_NOT_SUPPORTED: @@ -388,7 +385,7 @@ public class SpatializerHelper { 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); |