Home
last modified time | relevance | path

Searched refs:AudioAttributes (Results 1 – 25 of 117) sorted by relevance

12345

/frameworks/base/media/java/android/media/audiopolicy/
DAudioProductStrategy.java22 import android.media.AudioAttributes;
90 public static AudioAttributes getAudioAttributesForStrategyWithLegacyStreamType( in getAudioAttributesForStrategyWithLegacyStreamType()
94 AudioAttributes aa = productStrategy.getAudioAttributesForLegacyStreamType(streamType); in getAudioAttributesForStrategyWithLegacyStreamType()
99 return new AudioAttributes.Builder() in getAudioAttributesForStrategyWithLegacyStreamType()
100 .setContentType(AudioAttributes.CONTENT_TYPE_UNKNOWN) in getAudioAttributesForStrategyWithLegacyStreamType()
101 .setUsage(AudioAttributes.USAGE_UNKNOWN).build(); in getAudioAttributesForStrategyWithLegacyStreamType()
111 @NonNull AudioAttributes audioAttributes) { in getLegacyStreamTypeForStrategyWithAudioAttributes()
182 public @NonNull AudioAttributes getAudioAttributes() { in getAudioAttributes()
184 return mAudioAttributesGroups.length == 0 ? (new AudioAttributes.Builder().build()) in getAudioAttributes()
194 public @Nullable AudioAttributes getAudioAttributesForLegacyStreamType(int streamType) { in getAudioAttributesForLegacyStreamType()
[all …]
DAudioVolumeGroup.java21 import android.media.AudioAttributes;
56 private final AudioAttributes[] mAudioAttributes;
98 @NonNull AudioAttributes[] audioAttributes, in AudioVolumeGroup()
123 public @NonNull List<AudioAttributes> getAudioAttributes() { in getAudioAttributes()
158 for (AudioAttributes attributes : mAudioAttributes) { in writeToParcel()
159 attributes.writeToParcel(dest, flags | AudioAttributes.FLATTEN_TAGS/*flags*/); in writeToParcel()
175 AudioAttributes[] audioAttributes = new AudioAttributes[nbAttributes];
177 audioAttributes[index] = AudioAttributes.CREATOR.createFromParcel(in);
202 for (AudioAttributes attribute : mAudioAttributes) { in toString()
DAudioMixingRule.java23 import android.media.AudioAttributes;
100 final AudioAttributes mAttr;
107 AudioMixMatchCriterion(AudioAttributes attributes, int rule) { in AudioMixMatchCriterion()
144 public AudioAttributes getAudioAttributes() { return mAttr; } in getAudioAttributes()
280 public Builder addRule(AudioAttributes attrToMatch, int rule) in addRule()
308 public Builder excludeRule(AudioAttributes attrToMatch, int rule) in excludeRule()
402 if (!(property instanceof AudioAttributes)) { in checkAddRuleObjInternal()
405 return addRuleInternal((AudioAttributes) property, null, rule); in checkAddRuleObjInternal()
431 private Builder addRuleInternal(AudioAttributes attrToMatch, Integer intProp, int rule) in addRuleInternal()
519 AudioAttributes attr = null; in addRuleFromParcel()
[all …]
/frameworks/base/media/java/android/media/
DAudioFocusRequest.java222 private final static AudioAttributes FOCUS_DEFAULT_ATTR = new AudioAttributes.Builder()
223 .setUsage(AudioAttributes.USAGE_MEDIA).build();
230 private final @NonNull AudioAttributes mAttr;
235 AudioAttributes attr, int focusGain, int flags) { in AudioFocusRequest()
287 public @NonNull AudioAttributes getAudioAttributes() { in getAudioAttributes()
353 private AudioAttributes mAttr = FOCUS_DEFAULT_ATTR;
483 public @NonNull Builder setAudioAttributes(@NonNull AudioAttributes attributes) { in setAudioAttributes()
574 mAttr = new AudioAttributes.Builder(mAttr).addBundle(extraInfo).build(); in build()
DHwAudioSource.java36 private final AudioAttributes mAudioAttributes;
48 private HwAudioSource(@NonNull AudioDeviceInfo device, @NonNull AudioAttributes attributes) { in HwAudioSource()
178 private AudioAttributes mAudioAttributes;
193 public @NonNull Builder setAudioAttributes(@NonNull AudioAttributes attributes) { in setAudioAttributes()
220 mAudioAttributes = new AudioAttributes.Builder() in build()
221 .setUsage(AudioAttributes.USAGE_MEDIA) in build()
DAudioAttributes.java72 public final class AudioAttributes implements Parcelable { class
458 private AudioAttributes() { in AudioAttributes() method in AudioAttributes
610 public Builder(AudioAttributes aa) { in Builder()
624 public AudioAttributes build() { in build()
625 AudioAttributes aa = new AudioAttributes(); in build()
723 flags &= AudioAttributes.FLAG_ALL; in setFlags()
761 mFlags = flags & AudioAttributes.FLAG_ALL; in replaceFlags()
831 AudioAttributes attributes = in setInternalLegacyStreamType()
1000 private AudioAttributes(Parcel in) { in AudioAttributes() method in AudioAttributes
1029 public static final @android.annotation.NonNull Parcelable.Creator<AudioAttributes> CREATOR
[all …]
DIRingtonePlayer.aidl19 import android.media.AudioAttributes;
31 … oneway void play(IBinder token, in Uri uri, in AudioAttributes aa, float volume, boolean looping); in play()
32 oneway void playWithVolumeShaping(IBinder token, in Uri uri, in AudioAttributes aa, in playWithVolumeShaping()
39 oneway void playAsync(in Uri uri, in UserHandle user, boolean looping, in AudioAttributes aa); in playAsync()
DIAudioService.aidl20 import android.media.AudioAttributes;
57 oneway void playerAttributes(in int piid, in AudioAttributes attr); in playerAttributes()
97 …void setVolumeIndexForAttributes(in AudioAttributes aa, int index, int flags, String callingPackag… in setVolumeIndexForAttributes()
99 int getVolumeIndexForAttributes(in AudioAttributes aa); in getVolumeIndexForAttributes()
101 int getMaxVolumeIndexForAttributes(in AudioAttributes aa); in getMaxVolumeIndexForAttributes()
103 int getMinVolumeIndexForAttributes(in AudioAttributes aa); in getMinVolumeIndexForAttributes()
159 int requestAudioFocus(in AudioAttributes aa, int durationHint, IBinder cb, in requestAudioFocus()
163 int abandonAudioFocus(IAudioFocusDispatcher fd, String clientId, in AudioAttributes aa, in abandonAudioFocus()
237 int getFocusRampTimeMs(in int focusGain, in AudioAttributes attr); in getFocusRampTimeMs()
DRingtone.java84 private AudioAttributes mAudioAttributes = new AudioAttributes.Builder()
85 .setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE)
86 .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
112 setAudioAttributes(new AudioAttributes.Builder() in setStreamType()
126 return AudioAttributes.toLegacyStreamType(mAudioAttributes); in getStreamType()
133 public void setAudioAttributes(AudioAttributes attributes) in setAudioAttributes()
149 public AudioAttributes getAudioAttributes() { in getAudioAttributes()
372 AudioAttributes.toLegacyStreamType(mAudioAttributes)) != 0) { in play()
462 if (mAudioManager.getStreamVolume(AudioAttributes.toLegacyStreamType(mAudioAttributes)) in playFallbackRingtone()
DAudioFocusInfo.java36 private final @NonNull AudioAttributes mAttributes;
60 public AudioFocusInfo(AudioAttributes aa, int clientUid, String clientId, String packageName, in AudioFocusInfo()
62 mAttributes = aa == null ? new AudioAttributes.Builder().build() : aa; in AudioFocusInfo()
87 public @NonNull AudioAttributes getAttributes() { in getAttributes()
201 AudioAttributes.CREATOR.createFromParcel(in), //AudioAttributes aa
DAudioTrack.java395 private AudioAttributes mConfiguredAudioAttributes;
549 this((new AudioAttributes.Builder()) in AudioTrack()
592 public AudioTrack(AudioAttributes attributes, AudioFormat format, int bufferSizeInBytes, in AudioTrack()
598 private AudioTrack(AudioAttributes attributes, AudioFormat format, int bufferSizeInBytes, in AudioTrack()
612 mAttributes = new AudioAttributes.Builder(mAttributes) in AudioTrack()
614 | AudioAttributes.FLAG_DEEP_BUFFER) in AudioTrack()
615 & ~AudioAttributes.FLAG_LOW_LATENCY) in AudioTrack()
675 if ((mAttributes.getFlags() & AudioAttributes.FLAG_HW_AV_SYNC) != 0) { in AudioTrack()
706 super(new AudioAttributes.Builder().build(), in AudioTrack()
799 private AudioAttributes mAttributes;
[all …]
/frameworks/base/core/java/android/os/
DExternalVibration.java20 import android.media.AudioAttributes;
37 private AudioAttributes mAttrs;
45 public ExternalVibration(int uid, @NonNull String pkg, @NonNull AudioAttributes attrs, in ExternalVibration()
62 private AudioAttributes readAudioAttributes(Parcel in) { in readAudioAttributes()
67 AudioAttributes.Builder builder = new AudioAttributes.Builder(); in readAudioAttributes()
83 public AudioAttributes getAudioAttributes() { in getAudioAttributes()
164 private static void writeAudioAttributes(AudioAttributes attrs, Parcel out, int flags) { in writeAudioAttributes()
DVibrator.java26 import android.media.AudioAttributes;
168 @Nullable AudioAttributes attributes) { in setAlwaysOnEffect()
177 @Nullable VibrationEffect effect, @Nullable AudioAttributes attributes) { in setAlwaysOnEffect()
208 public void vibrate(long milliseconds, AudioAttributes attributes) { in vibrate()
271 public void vibrate(long[] pattern, int repeat, AudioAttributes attributes) { in vibrate()
293 public void vibrate(VibrationEffect vibe, AudioAttributes attributes) { in vibrate()
304 String reason, AudioAttributes attributes); in vibrate()
DIVibratorService.aidl19 import android.media.AudioAttributes;
28 in AudioAttributes attributes); in setAlwaysOnEffect()
29 void vibrate(int uid, String opPkg, in VibrationEffect effect, in AudioAttributes attributes, in vibrate()
/frameworks/base/media/tests/AudioPolicyTest/src/com/android/audiopolicytest/
DAudioVolumesTestBase.java21 import android.media.AudioAttributes;
39 public static final AudioAttributes sDefaultAttributes =
42 public static final AudioAttributes sInvalidAttributes = new AudioAttributes.Builder().build();
64 AudioAttributes avgAttributes = sDefaultAttributes; in storeAllVolumes()
65 for (final AudioAttributes aa : avg.getAudioAttributes()) { in storeAllVolumes()
90 AudioAttributes avgAttributes = sDefaultAttributes; in restoreAllVolumes()
91 for (final AudioAttributes aa : avg.getAudioAttributes()) { in restoreAllVolumes()
DAudioManagerTest.java23 import android.media.AudioAttributes;
50 AudioAttributes attributes = audioProductStrategy.getAudioAttributes(); in testGetAndValidateProductStrategies()
77 for (final AudioAttributes aa : audioVolumeGroup.getAudioAttributes()) { in testGetAndValidateProductStrategies()
115 List<AudioAttributes> avgAttributes = audioVolumeGroup.getAudioAttributes(); in testGetAndValidateVolumeGroups()
120 for (final AudioAttributes aa : avgAttributes) { in testGetAndValidateVolumeGroups()
184 AudioAttributes nullAttributes = null; in testSetGetVolumePerAttributesWithInvalidAttributes()
201 for (int usage : AudioAttributes.SDK_USAGES) { in testSetGetVolumePerAttributes()
202 if (usage == AudioAttributes.USAGE_UNKNOWN) { in testSetGetVolumePerAttributes()
205 AudioAttributes aaForUsage = new AudioAttributes.Builder().setUsage(usage).build(); in testSetGetVolumePerAttributes()
266 List<AudioAttributes> avgAttributes = audioVolumeGroup.getAudioAttributes(); in testVolumeGroupCallback()
[all …]
DAudioProductStrategyTest.java22 import android.media.AudioAttributes;
46 AudioAttributes aa = aps.getAudioAttributes(); in testGetProductStrategies()
75 AudioAttributes aaFromStreamType = in testAudioAttributesFromStreamTypes()
104 AudioAttributes aaFromAps = in testAudioAttributesFromStreamTypes()
148 for (int usage : AudioAttributes.SDK_USAGES) { in testAudioAttributesToStreamTypes()
149 AudioAttributes aaForUsage = new AudioAttributes.Builder().setUsage(usage).build(); in testAudioAttributesToStreamTypes()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DVibratorHelper.java21 import android.media.AudioAttributes;
40 private static final AudioAttributes STATUS_BAR_VIBRATION_ATTRIBUTES =
41 new AudioAttributes.Builder()
42 .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
43 .setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
/frameworks/base/services/core/java/com/android/server/audio/
DMediaFocusControl.java23 import android.media.AudioAttributes;
717 { AudioAttributes.USAGE_MEDIA, AudioAttributes.USAGE_GAME };
725 protected static int getFocusRampTimeMs(int focusGain, AudioAttributes attr) { in getFocusRampTimeMs()
727 case AudioAttributes.USAGE_MEDIA: in getFocusRampTimeMs()
728 case AudioAttributes.USAGE_GAME: in getFocusRampTimeMs()
730 case AudioAttributes.USAGE_ALARM: in getFocusRampTimeMs()
731 case AudioAttributes.USAGE_NOTIFICATION_RINGTONE: in getFocusRampTimeMs()
732 case AudioAttributes.USAGE_ASSISTANT: in getFocusRampTimeMs()
733 case AudioAttributes.USAGE_ASSISTANCE_ACCESSIBILITY: in getFocusRampTimeMs()
734 case AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE: in getFocusRampTimeMs()
[all …]
/frameworks/av/media/libaudioclient/include/media/
DAudioAttributes.h27 class AudioAttributes : public Parcelable
30 AudioAttributes() = default;
31 AudioAttributes(const audio_attributes_t &attributes) : mAttributes(attributes) {} in AudioAttributes() function
32 AudioAttributes(volume_group_t groupId, in AudioAttributes() function
DAudioProductStrategy.h32 AudioProductStrategy(const std::string &name, const std::vector<AudioAttributes> &attributes, in AudioProductStrategy()
37 std::vector<AudioAttributes> getAudioAttributes() const { return mAudioAttributes; } in getAudioAttributes()
59 std::vector<AudioAttributes> mAudioAttributes;
/frameworks/base/tests/permission/src/com/android/framework/permission/tests/
DVibratorServicePermissionTest.java19 import android.media.AudioAttributes;
55 final AudioAttributes attrs = new AudioAttributes.Builder() in testVibrate()
56 .setUsage(AudioAttributes.USAGE_ALARM) in testVibrate()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DNotificationChannels.java21 import android.media.AudioAttributes;
48 batteryChannel.setSound(Uri.parse("file://" + soundPath), new AudioAttributes.Builder() in createAll()
49 .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION) in createAll()
50 .setUsage(AudioAttributes.USAGE_NOTIFICATION_EVENT) in createAll()
116 new AudioAttributes.Builder().setUsage(AudioAttributes.USAGE_NOTIFICATION).build()); in createScreenshotChannel()
/frameworks/base/services/core/java/com/android/server/
DVibratorService.java34 import android.media.AudioAttributes;
206 public final AudioAttributes attrs;
219 AudioAttributes attrs, int uid, String opPkg, String reason) { in Vibration()
302 private final AudioAttributes mAttrs;
308 VibrationEffect originalEffect, AudioAttributes attrs, int uid, in VibrationInfo()
530 AudioAttributes attrs) { in setAlwaysOnEffect()
595 private AudioAttributes fixupVibrationAttributes(AudioAttributes attrs) { in fixupVibrationAttributes()
597 attrs = new AudioAttributes.Builder() in fixupVibrationAttributes()
598 .setUsage(AudioAttributes.USAGE_UNKNOWN) in fixupVibrationAttributes()
606 & ~AudioAttributes.FLAG_BYPASS_INTERRUPTION_POLICY; in fixupVibrationAttributes()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/
DExternalVibrationTest.java23 import android.media.AudioAttributes;
33 AudioAttributes audio = new AudioAttributes.Builder().build(); in testSerialization()

12345