commit | c491da46db6f87e35e983615a9e01500c61be209 | [log] [tgz] |
---|---|---|
author | Vlad Popa <pvlad@google.com> | Tue Feb 20 19:05:15 2024 -0800 |
committer | Vlad Popa <pvlad@google.com> | Tue Feb 20 19:05:15 2024 -0800 |
tree | 05e930a216449a7f11b12d46f908c0f6f3d63848 | |
parent | c747d153384b96e29e8d33b3023405eac2dca87d [diff] |
Allow to reset to category unknown. Test: manual reset the device type to unknown Bug: 302323921 Change-Id: I464b54625a7225b83a517901723811a01bb822be
diff --git a/services/core/java/com/android/server/audio/AudioDeviceInventory.java b/services/core/java/com/android/server/audio/AudioDeviceInventory.java index 102a960..8d9b5da 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceInventory.java +++ b/services/core/java/com/android/server/audio/AudioDeviceInventory.java
@@ -167,8 +167,7 @@ ads = findBtDeviceStateForAddress(peerAddress, deviceType); } if (ads != null) { - if (ads.getAudioDeviceCategory() != category - && category != AUDIO_DEVICE_CATEGORY_UNKNOWN) { + if (ads.getAudioDeviceCategory() != category) { ads.setAudioDeviceCategory(category); mDeviceBroker.postUpdatedAdiDeviceState(ads); mDeviceBroker.postPersistAudioDeviceSettings();