package android.media;
+import static android.media.AudioAttributes.ALLOW_CAPTURE_BY_ALL;
+import static android.media.AudioAttributes.ALLOW_CAPTURE_BY_NONE;
+
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
.setUsage(in.mPlayerAttr.getUsage())
.setContentType(in.mPlayerAttr.getContentType())
.setFlags(in.mPlayerAttr.getFlags())
+ .setAllowedCapturePolicy(
+ in.mPlayerAttr.getAllowedCapturePolicy() == ALLOW_CAPTURE_BY_ALL
+ ? ALLOW_CAPTURE_BY_ALL : ALLOW_CAPTURE_BY_NONE)
.build();
// anonymized data
anonymCopy.mPlayerType = PLAYER_TYPE_UNKNOWN;