From a7d0556490060ba0a4ddae2a8d4655be754f1819 Mon Sep 17 00:00:00 2001 From: Paul Wang Date: Tue, 6 Dec 2022 10:49:15 +0000 Subject: [PATCH] Remove used error check in getDevicesForAttributesImpl Bug: None Test: None Change-Id: Ib4680327f00a8c0f5a4518dc13bf7b013167ee27 --- .../java/com/android/server/audio/AudioSystemAdapter.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/services/core/java/com/android/server/audio/AudioSystemAdapter.java b/services/core/java/com/android/server/audio/AudioSystemAdapter.java index c3754eb3e44c0..cc1ee6ff03847 100644 --- a/services/core/java/com/android/server/audio/AudioSystemAdapter.java +++ b/services/core/java/com/android/server/audio/AudioSystemAdapter.java @@ -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]