Remove used error check in getDevicesForAttributesImpl

Bug: None
Test: None
Change-Id: Ib4680327f00a8c0f5a4518dc13bf7b013167ee27
This commit is contained in:
Paul Wang
2022-12-06 10:49:15 +00:00
parent 9f06cf8240
commit a7d0556490

View File

@@ -189,15 +189,7 @@ public class AudioSystemAdapter implements AudioSystem.RoutingUpdateCallback,
synchronized (mDevicesForAttrCache) {
res = mDevicesForAttrCache.get(key);
if (res == null) {
// result from AudioSystem guaranteed non-null, but could be invalid
// if there is a failure to talk to APM
res = AudioSystem.getDevicesForAttributes(attributes, forVolume);
if (res.size() > 1 && res.get(0) != null
&& res.get(0).getInternalType() == AudioSystem.DEVICE_NONE) {
Log.e(TAG, "unable to get devices for " + attributes);
// return now, do not put invalid value in cache
return res;
}
mDevicesForAttrCache.put(key, res);
if (DEBUG_CACHE) {
Log.d(TAG, mMethodNames[METHOD_GETDEVICESFORATTRIBUTES]