Loading media/java/android/media/audiopolicy/AudioProductStrategy.java +8 −6 Original line number Diff line number Diff line Loading @@ -134,9 +134,11 @@ public final class AudioProductStrategy implements Parcelable { /** * @hide * @param audioAttributes to identify AudioProductStrategy with * @return legacy stream type associated with matched AudioProductStrategy * Defaults to STREAM_MUSIC if no match is found, or if matches is STREAM_DEFAULT * @param audioAttributes to identify {@link AudioProductStrategy} with * @return legacy stream type associated with matched {@link AudioProductStrategy}. If no * strategy found or found {@link AudioProductStrategy} does not have associated * legacy stream (i.e. associated with {@link AudioSystem#STREAM_DEFAULT}) defaults * to {@link AudioSystem#STREAM_MUSIC} */ public static int getLegacyStreamTypeForStrategyWithAudioAttributes( @NonNull AudioAttributes audioAttributes) { Loading @@ -147,9 +149,9 @@ public final class AudioProductStrategy implements Parcelable { int streamType = productStrategy.getLegacyStreamTypeForAudioAttributes( audioAttributes); if (streamType == AudioSystem.STREAM_DEFAULT) { Log.w(TAG, "Attributes " + audioAttributes.toString() + " ported by strategy " + productStrategy.getId() + " has no stream type associated, " + "DO NOT USE STREAM TO CONTROL THE VOLUME"); Log.w(TAG, "Attributes " + audioAttributes + " supported by strategy " + productStrategy.getId() + " have no associated stream type, " + "therefore falling back to STREAM_MUSIC"); return AudioSystem.STREAM_MUSIC; } if (streamType < AudioSystem.getNumStreamTypes()) { Loading Loading
media/java/android/media/audiopolicy/AudioProductStrategy.java +8 −6 Original line number Diff line number Diff line Loading @@ -134,9 +134,11 @@ public final class AudioProductStrategy implements Parcelable { /** * @hide * @param audioAttributes to identify AudioProductStrategy with * @return legacy stream type associated with matched AudioProductStrategy * Defaults to STREAM_MUSIC if no match is found, or if matches is STREAM_DEFAULT * @param audioAttributes to identify {@link AudioProductStrategy} with * @return legacy stream type associated with matched {@link AudioProductStrategy}. If no * strategy found or found {@link AudioProductStrategy} does not have associated * legacy stream (i.e. associated with {@link AudioSystem#STREAM_DEFAULT}) defaults * to {@link AudioSystem#STREAM_MUSIC} */ public static int getLegacyStreamTypeForStrategyWithAudioAttributes( @NonNull AudioAttributes audioAttributes) { Loading @@ -147,9 +149,9 @@ public final class AudioProductStrategy implements Parcelable { int streamType = productStrategy.getLegacyStreamTypeForAudioAttributes( audioAttributes); if (streamType == AudioSystem.STREAM_DEFAULT) { Log.w(TAG, "Attributes " + audioAttributes.toString() + " ported by strategy " + productStrategy.getId() + " has no stream type associated, " + "DO NOT USE STREAM TO CONTROL THE VOLUME"); Log.w(TAG, "Attributes " + audioAttributes + " supported by strategy " + productStrategy.getId() + " have no associated stream type, " + "therefore falling back to STREAM_MUSIC"); return AudioSystem.STREAM_MUSIC; } if (streamType < AudioSystem.getNumStreamTypes()) { Loading