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

Commit e6da2b98 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove used error check in getDevicesForAttributesImpl"

parents 68cfa172 a7d05564
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -192,15 +192,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]