Lines Matching refs:aa
372 * @param aa the AudioAttributes object whose data will be reused in the new Builder.
375 public Builder(AudioAttributes aa) {
376 mUsage = aa.mUsage;
377 mContentType = aa.mContentType;
378 mFlags = aa.mFlags;
379 mTags = (HashSet<String>) aa.mTags.clone();
389 AudioAttributes aa = new AudioAttributes();
390 aa.mContentType = mContentType;
391 aa.mUsage = mUsage;
392 aa.mSource = mSource;
393 aa.mFlags = mFlags;
394 aa.mTags = (HashSet<String>) mTags.clone();
395 aa.mFormattedTags = TextUtils.join(";", mTags);
397 aa.mBundle = new Bundle(mBundle);
399 return aa;
818 * @param aa non-null AudioAttributes.
824 public static int getVolumeControlStream(@NonNull AudioAttributes aa) {
825 if (aa == null) {
828 return toVolumeStreamType(true /*fromGetVolumeControlStream*/, aa);
835 * @param aa non-null AudioAttributes.
838 public static int toLegacyStreamType(@NonNull AudioAttributes aa) {
839 return toVolumeStreamType(false /*fromGetVolumeControlStream*/, aa);
842 private static int toVolumeStreamType(boolean fromGetVolumeControlStream, AudioAttributes aa) {
844 if ((aa.getFlags() & FLAG_AUDIBILITY_ENFORCED) == FLAG_AUDIBILITY_ENFORCED) {
848 if ((aa.getFlags() & FLAG_SCO) == FLAG_SCO) {
854 switch (aa.getUsage()) {
882 throw new IllegalArgumentException("Unknown usage value " + aa.getUsage() +