Loading media/java/android/media/AudioAttributes.java +45 −44 Original line number Diff line number Diff line Loading @@ -1167,7 +1167,10 @@ public final class AudioAttributes implements Parcelable { streamType); if (attributes != null) { mUsage = attributes.mUsage; mContentType = attributes.mContentType; // on purpose ignoring the content type: stream types are deprecated for // playback, making assumptions about the content type is prone to // interpretation errors for ambiguous types such as STREAM_TTS and STREAM_MUSIC //mContentType = attributes.mContentType; mFlags = attributes.getAllFlags(); mMuteHapticChannels = attributes.areHapticChannelsMuted(); mIsContentSpatialized = attributes.isContentSpatialized(); Loading @@ -1177,7 +1180,6 @@ public final class AudioAttributes implements Parcelable { mSource = attributes.mSource; } } if (mContentType == CONTENT_TYPE_UNKNOWN) { switch (streamType) { case AudioSystem.STREAM_VOICE_CALL: mContentType = CONTENT_TYPE_SPEECH; Loading @@ -1191,9 +1193,6 @@ public final class AudioAttributes implements Parcelable { case AudioSystem.STREAM_RING: mContentType = CONTENT_TYPE_SONIFICATION; break; case AudioSystem.STREAM_MUSIC: mContentType = CONTENT_TYPE_MUSIC; break; case AudioSystem.STREAM_ALARM: mContentType = CONTENT_TYPE_SONIFICATION; break; Loading @@ -1217,10 +1216,12 @@ public final class AudioAttributes implements Parcelable { case AudioSystem.STREAM_ASSISTANT: mContentType = CONTENT_TYPE_SPEECH; break; case AudioSystem.STREAM_MUSIC: // leaving as CONTENT_TYPE_UNKNOWN break; default: Log.e(TAG, "Invalid stream type " + streamType + " for AudioAttributes"); } } if (mUsage == USAGE_UNKNOWN) { mUsage = usageForStreamType(streamType); } Loading Loading
media/java/android/media/AudioAttributes.java +45 −44 Original line number Diff line number Diff line Loading @@ -1167,7 +1167,10 @@ public final class AudioAttributes implements Parcelable { streamType); if (attributes != null) { mUsage = attributes.mUsage; mContentType = attributes.mContentType; // on purpose ignoring the content type: stream types are deprecated for // playback, making assumptions about the content type is prone to // interpretation errors for ambiguous types such as STREAM_TTS and STREAM_MUSIC //mContentType = attributes.mContentType; mFlags = attributes.getAllFlags(); mMuteHapticChannels = attributes.areHapticChannelsMuted(); mIsContentSpatialized = attributes.isContentSpatialized(); Loading @@ -1177,7 +1180,6 @@ public final class AudioAttributes implements Parcelable { mSource = attributes.mSource; } } if (mContentType == CONTENT_TYPE_UNKNOWN) { switch (streamType) { case AudioSystem.STREAM_VOICE_CALL: mContentType = CONTENT_TYPE_SPEECH; Loading @@ -1191,9 +1193,6 @@ public final class AudioAttributes implements Parcelable { case AudioSystem.STREAM_RING: mContentType = CONTENT_TYPE_SONIFICATION; break; case AudioSystem.STREAM_MUSIC: mContentType = CONTENT_TYPE_MUSIC; break; case AudioSystem.STREAM_ALARM: mContentType = CONTENT_TYPE_SONIFICATION; break; Loading @@ -1217,10 +1216,12 @@ public final class AudioAttributes implements Parcelable { case AudioSystem.STREAM_ASSISTANT: mContentType = CONTENT_TYPE_SPEECH; break; case AudioSystem.STREAM_MUSIC: // leaving as CONTENT_TYPE_UNKNOWN break; default: Log.e(TAG, "Invalid stream type " + streamType + " for AudioAttributes"); } } if (mUsage == USAGE_UNKNOWN) { mUsage = usageForStreamType(streamType); } Loading