Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7d05564 authored by Paul Wang's avatar Paul Wang
Browse files

Remove used error check in getDevicesForAttributesImpl

Bug: None
Test: None
Change-Id: Ib4680327f00a8c0f5a4518dc13bf7b013167ee27
parent 9f06cf82
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -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]