Merge "Add AudioAttributes.getAllowedCapturePolicy" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6335a6149a
@@ -23045,6 +23045,7 @@ package android.media {
|
|||||||
public final class AudioAttributes implements android.os.Parcelable {
|
public final class AudioAttributes implements android.os.Parcelable {
|
||||||
method public boolean areHapticChannelsMuted();
|
method public boolean areHapticChannelsMuted();
|
||||||
method public int describeContents();
|
method public int describeContents();
|
||||||
|
method public int getAllowedCapturePolicy();
|
||||||
method public int getContentType();
|
method public int getContentType();
|
||||||
method public int getFlags();
|
method public int getFlags();
|
||||||
method public int getUsage();
|
method public int getUsage();
|
||||||
|
|||||||
@@ -534,6 +534,23 @@ public final class AudioAttributes implements Parcelable {
|
|||||||
return (mFlags & FLAG_MUTE_HAPTIC) != 0;
|
return (mFlags & FLAG_MUTE_HAPTIC) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the capture policy.
|
||||||
|
* @return the capture policy set by {@link Builder#setAllowedCapturePolicy(int)} or
|
||||||
|
* the default if it was not called.
|
||||||
|
*/
|
||||||
|
@CapturePolicy
|
||||||
|
public int getAllowedCapturePolicy() {
|
||||||
|
if ((mFlags & FLAG_NO_SYSTEM_CAPTURE) == FLAG_NO_SYSTEM_CAPTURE) {
|
||||||
|
return ALLOW_CAPTURE_BY_NONE;
|
||||||
|
}
|
||||||
|
if ((mFlags & FLAG_NO_MEDIA_PROJECTION) == FLAG_NO_MEDIA_PROJECTION) {
|
||||||
|
return ALLOW_CAPTURE_BY_SYSTEM;
|
||||||
|
}
|
||||||
|
return ALLOW_CAPTURE_BY_ALL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builder class for {@link AudioAttributes} objects.
|
* Builder class for {@link AudioAttributes} objects.
|
||||||
* <p> Here is an example where <code>Builder</code> is used to define the
|
* <p> Here is an example where <code>Builder</code> is used to define the
|
||||||
|
|||||||
Reference in New Issue
Block a user