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

Commit c48b0c9e authored by Eric Laurent's avatar Eric Laurent Committed by Gerrit Code Review
Browse files

Merge "AudioService: fix AudioProductStrategy matching rule"

parents 6ed4be3a 05672e53
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -505,6 +505,16 @@ public final class AudioAttributes implements Parcelable {
        return (mFlags & FLAG_ALL);
    }

    /**
     * @hide
     * Return usage, even the non-public ones.
     * Internal use only
     * @return one of the values that can be set in {@link Builder#setUsage(int)}
     */
    public int getSystemUsage() {
        return mUsage;
    }

    /**
     * @hide
     * Return the Bundle of data.
+2 −2
Original line number Diff line number Diff line
@@ -336,8 +336,8 @@ public final class AudioProductStrategy implements Parcelable {
        if (refAttr.equals(sDefaultAttributes)) {
            return false;
        }
        return ((refAttr.getUsage() == AudioAttributes.USAGE_UNKNOWN)
                || (attr.getUsage() == refAttr.getUsage()))
        return ((refAttr.getSystemUsage() == AudioAttributes.USAGE_UNKNOWN)
                || (attr.getSystemUsage() == refAttr.getSystemUsage()))
            && ((refAttr.getContentType() == AudioAttributes.CONTENT_TYPE_UNKNOWN)
                || (attr.getContentType() == refAttr.getContentType()))
            && ((refAttr.getAllFlags() == 0)