Merge "AudioService: fix AudioProductStrategy matching rule" am: c48b0c9e96
Change-Id: Ib3160d8aaec8a3c28f51e794e12637172a7788ad
This commit is contained in:
@@ -505,6 +505,16 @@ public final class AudioAttributes implements Parcelable {
|
|||||||
return (mFlags & FLAG_ALL);
|
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
|
* @hide
|
||||||
* Return the Bundle of data.
|
* Return the Bundle of data.
|
||||||
|
|||||||
@@ -336,8 +336,8 @@ public final class AudioProductStrategy implements Parcelable {
|
|||||||
if (refAttr.equals(sDefaultAttributes)) {
|
if (refAttr.equals(sDefaultAttributes)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ((refAttr.getUsage() == AudioAttributes.USAGE_UNKNOWN)
|
return ((refAttr.getSystemUsage() == AudioAttributes.USAGE_UNKNOWN)
|
||||||
|| (attr.getUsage() == refAttr.getUsage()))
|
|| (attr.getSystemUsage() == refAttr.getSystemUsage()))
|
||||||
&& ((refAttr.getContentType() == AudioAttributes.CONTENT_TYPE_UNKNOWN)
|
&& ((refAttr.getContentType() == AudioAttributes.CONTENT_TYPE_UNKNOWN)
|
||||||
|| (attr.getContentType() == refAttr.getContentType()))
|
|| (attr.getContentType() == refAttr.getContentType()))
|
||||||
&& ((refAttr.getAllFlags() == 0)
|
&& ((refAttr.getAllFlags() == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user