Home
last modified time | relevance | path

Searched refs:AudioManager (Results 1 – 25 of 147) sorted by relevance

123456

/frameworks/base/services/core/java/com/android/server/audio/
DFocusRequester.java23 import android.media.AudioManager;
103 mFocusLossReceived = AudioManager.AUDIOFOCUS_NONE; in FocusRequester()
116 mFocusLossReceived = AudioManager.AUDIOFOCUS_NONE; in FocusRequester()
132 return ((mGrantFlags & AudioManager.AUDIOFOCUS_FLAG_LOCK) != 0); in isLockedFocusOwner()
177 case AudioManager.AUDIOFOCUS_NONE: in focusChangeToString()
179 case AudioManager.AUDIOFOCUS_GAIN: in focusChangeToString()
181 case AudioManager.AUDIOFOCUS_GAIN_TRANSIENT: in focusChangeToString()
183 case AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK: in focusChangeToString()
185 case AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE: in focusChangeToString()
187 case AudioManager.AUDIOFOCUS_LOSS: in focusChangeToString()
[all …]
DRecordingActivityMonitor.java22 import android.media.AudioManager;
64 mRiid = AudioManager.RECORD_RIID_INVALID; in RecordingState()
154 return AudioManager.RECORD_RIID_INVALID; in trackRecorder()
160 return AudioManager.RECORD_RIID_INVALID; in trackRecorder()
173 int configEvent = event == AudioManager.RECORDER_STATE_STARTED in recorderEvent()
174 ? AudioManager.RECORD_CONFIG_EVENT_START : in recorderEvent()
175 event == AudioManager.RECORDER_STATE_STOPPED in recorderEvent()
176 ? AudioManager.RECORD_CONFIG_EVENT_STOP : AudioManager.RECORD_CONFIG_EVENT_NONE; in recorderEvent()
177 if (riid == AudioManager.RECORD_RIID_INVALID in recorderEvent()
178 || configEvent == AudioManager.RECORD_CONFIG_EVENT_NONE) { in recorderEvent()
[all …]
DMediaFocusControl.java25 import android.media.AudioManager;
156 focusOwner.dispatchFocusChange(AudioManager.AUDIOFOCUS_LOSS); in noFocusForSuspendedApp()
182 exFocusOwner.handleFocusLoss(AudioManager.AUDIOFOCUS_LOSS, null, in discardAudioFocusOwner()
194 mFocusStack.peek().handleFocusGain(AudioManager.AUDIOFOCUS_GAIN); in notifyTopOfAudioFocusStack()
389 return AudioManager.AUDIOFOCUS_REQUEST_GRANTED; in pushBelowLockedFocusOwners()
392 return AudioManager.AUDIOFOCUS_REQUEST_DELAYED; in pushBelowLockedFocusOwners()
528 AudioManager.AUDIOFOCUS_REQUEST_GRANTED); in notifyExtPolicyCurrentFocusAsync()
613 mFocusPolicy.notifyAudioFocusRequest(afi, AudioManager.AUDIOFOCUS_REQUEST_GRANTED); in notifyExtFocusPolicyFocusRequest_syncAf()
629 if (requestResult == AudioManager.AUDIOFOCUS_REQUEST_FAILED) { in setFocusRequestResultFromExtPolicy()
671 return AudioManager.AUDIOFOCUS_REQUEST_FAILED; in dispatchFocusChange()
[all …]
DBtHelper.java30 import android.media.AudioManager;
177 mScoConnectionState = android.media.AudioManager.SCO_AUDIO_STATE_ERROR; in onSystemReady()
183 Intent newIntent = new Intent(AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED); in onSystemReady()
184 newIntent.putExtra(AudioManager.EXTRA_SCO_AUDIO_STATE, in onSystemReady()
185 AudioManager.SCO_AUDIO_STATE_DISCONNECTED); in onSystemReady()
257 int scoAudioState = AudioManager.SCO_AUDIO_STATE_ERROR; in receiveBtEvent()
269 scoAudioState = AudioManager.SCO_AUDIO_STATE_CONNECTED; in receiveBtEvent()
278 scoAudioState = AudioManager.SCO_AUDIO_STATE_DISCONNECTED; in receiveBtEvent()
309 Intent newIntent = new Intent(AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED); in receiveBtEvent()
310 newIntent.putExtra(AudioManager.EXTRA_SCO_AUDIO_STATE, scoAudioState); in receiveBtEvent()
[all …]
DAudioService.java20 import static android.media.AudioManager.RINGER_MODE_NORMAL;
21 import static android.media.AudioManager.RINGER_MODE_SILENT;
22 import static android.media.AudioManager.RINGER_MODE_VIBRATE;
23 import static android.media.AudioManager.STREAM_SYSTEM;
69 import android.media.AudioManager;
490 private int mPrevVolDirection = AudioManager.ADJUST_SAME;
1536 cr, Settings.Global.MODE_RINGER, AudioManager.RINGER_MODE_NORMAL); in readPersistedSettings()
1541 ringerMode = AudioManager.RINGER_MODE_NORMAL; in readPersistedSettings()
1543 if ((ringerMode == AudioManager.RINGER_MODE_VIBRATE) && !mHasVibrator) { in readPersistedSettings()
1544 ringerMode = AudioManager.RINGER_MODE_SILENT; in readPersistedSettings()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/audio/
DMediaAudioManagerTest.java21 import android.media.AudioManager;
23 import android.media.AudioManager.OnAudioFocusChangeListener;
38 private AudioManager mAudioManager;
43 private int[] ringtoneMode = {AudioManager.RINGER_MODE_NORMAL,
44 AudioManager.RINGER_MODE_SILENT, AudioManager.RINGER_MODE_VIBRATE};
57 mAudioManager = (AudioManager)getActivity().getSystemService(Context.AUDIO_SERVICE); in initializeAudioManagerWithLooper()
101 return (getRingtone == AudioManager.RINGER_MODE_NORMAL); in validateSetRingTone()
146 AudioManager.STREAM_MUSIC, in verifyAudioFocusLoss()
147 AudioManager.AUDIOFOCUS_GAIN); in verifyAudioFocusLoss()
149 result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED); in verifyAudioFocusLoss()
[all …]
DMediaVisualizerTest.java24 import android.media.AudioManager;
233 AudioManager am = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE); in test2_0PollingCapture()
235 am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); in test2_0PollingCapture()
236 int volume = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in test2_0PollingCapture()
237 am.setStreamVolume(AudioManager.STREAM_MUSIC, in test2_0PollingCapture()
238 am.getStreamMaxVolume(AudioManager.STREAM_MUSIC), in test2_0PollingCapture()
253 mp.setAudioStreamType(AudioManager.STREAM_MUSIC); in test2_0PollingCapture()
299 am.setStreamVolume(AudioManager.STREAM_MUSIC, volume, 0); in test2_0PollingCapture()
312 AudioManager am = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE); in test2_1ListenerCapture()
314 am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); in test2_1ListenerCapture()
[all …]
DMediaAudioTrackTest.java23 import android.media.AudioManager;
142 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STREAM, in testConstructorMono16MusicStream()
155 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STREAM, in testConstructorStereo16MusicStream()
168 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STATIC, in testConstructorMono16MusicStatic()
181 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STATIC, in testConstructorStereo16MusicStatic()
198 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STREAM, in testConstructorMono8MusicStream()
210 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STREAM, in testConstructorStereo8MusicStream()
222 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STATIC, in testConstructorMono8MusicStatic()
234 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STATIC, in testConstructorStereo8MusicStatic()
254 final int[] STREAM_TYPES = { AudioManager.STREAM_ALARM, AudioManager.STREAM_BLUETOOTH_SCO, in testConstructorStreamType()
[all …]
DMediaPresetReverbTest.java25 import android.media.AudioManager;
200 AudioManager am = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE); in test2_0AuxiliarySoundModification()
202 am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); in test2_0AuxiliarySoundModification()
203 int volume = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in test2_0AuxiliarySoundModification()
204 am.setStreamVolume(AudioManager.STREAM_MUSIC, in test2_0AuxiliarySoundModification()
205 am.getStreamMaxVolume(AudioManager.STREAM_MUSIC), in test2_0AuxiliarySoundModification()
221 mp.setAudioStreamType(AudioManager.STREAM_MUSIC); in test2_0AuxiliarySoundModification()
258 am.setStreamVolume(AudioManager.STREAM_MUSIC, volume, 0); in test2_0AuxiliarySoundModification()
273 AudioManager am = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE); in test2_1InsertSoundModification()
275 am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); in test2_1InsertSoundModification()
[all …]
DMediaEnvReverbTest.java25 import android.media.AudioManager;
355 AudioManager am = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE); in test2_0AuxiliarySoundModification()
357 am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); in test2_0AuxiliarySoundModification()
358 int volume = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in test2_0AuxiliarySoundModification()
359 am.setStreamVolume(AudioManager.STREAM_MUSIC, in test2_0AuxiliarySoundModification()
360 am.getStreamMaxVolume(AudioManager.STREAM_MUSIC), in test2_0AuxiliarySoundModification()
376 mp.setAudioStreamType(AudioManager.STREAM_MUSIC); in test2_0AuxiliarySoundModification()
415 am.setStreamVolume(AudioManager.STREAM_MUSIC, volume, 0); in test2_0AuxiliarySoundModification()
430 AudioManager am = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE); in test2_1InsertSoundModification()
432 am.setRingerMode(AudioManager.RINGER_MODE_NORMAL); in test2_1InsertSoundModification()
[all …]
/frameworks/base/tests/FixVibrateSetting/src/com/android/fixvibratesetting/
DFixVibrateSetting.java24 import android.media.AudioManager;
32 AudioManager mAudioManager;
45 mAudioManager = (AudioManager)getSystemService(AUDIO_SERVICE); in onCreate()
70 case AudioManager.VIBRATE_SETTING_OFF: in getSettingValue()
72 case AudioManager.VIBRATE_SETTING_ON: in getSettingValue()
74 case AudioManager.VIBRATE_SETTING_ONLY_SILENT: in getSettingValue()
95 String ringer = getSettingValue(AudioManager.VIBRATE_TYPE_RINGER); in update()
96 String notification = getSettingValue(AudioManager.VIBRATE_TYPE_NOTIFICATION); in update()
102 mAudioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION, in fix()
103 AudioManager.VIBRATE_SETTING_ON); in fix()
[all …]
/frameworks/base/media/tests/AudioPolicyTest/src/com/android/audiopolicytest/
DAudioVolumesTestBase.java22 import android.media.AudioManager;
32 public AudioManager mAudioManager;
44 public final int[] PUBLIC_STREAM_TYPES = { AudioManager.STREAM_VOICE_CALL,
45 AudioManager.STREAM_SYSTEM, AudioManager.STREAM_RING, AudioManager.STREAM_MUSIC,
46 AudioManager.STREAM_ALARM, AudioManager.STREAM_NOTIFICATION,
47 AudioManager.STREAM_DTMF, AudioManager.STREAM_ACCESSIBILITY };
99 avgAttributes, e.getValue(), AudioManager.FLAG_ALLOW_RINGER_MODES); in restoreAllVolumes()
110 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp()
132 AudioManager.FLAG_ALLOW_RINGER_MODES); in tearDown()
/frameworks/base/media/java/android/media/
DAudioFocusRequest.java23 import android.media.AudioManager.OnAudioFocusChangeListener;
251 case AudioManager.AUDIOFOCUS_GAIN: in isValidFocusGain()
252 case AudioManager.AUDIOFOCUS_GAIN_TRANSIENT: in isValidFocusGain()
253 case AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK: in isValidFocusGain()
254 case AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE: in isValidFocusGain()
308 return (mFlags & AudioManager.AUDIOFOCUS_FLAG_PAUSES_ON_DUCKABLE_LOSS) in willPauseWhenDucked()
309 == AudioManager.AUDIOFOCUS_FLAG_PAUSES_ON_DUCKABLE_LOSS; in willPauseWhenDucked()
318 return (mFlags & AudioManager.AUDIOFOCUS_FLAG_DELAY_OK) in acceptsDelayedFocusGain()
319 == AudioManager.AUDIOFOCUS_FLAG_DELAY_OK; in acceptsDelayedFocusGain()
330 return (mFlags & AudioManager.AUDIOFOCUS_FLAG_LOCK) in locksFocus()
[all …]
DAudioPortEventHandler.java41 private final ArrayList<AudioManager.OnAudioPortUpdateListener> mListeners =
42 new ArrayList<AudioManager.OnAudioPortUpdateListener>();
73 ArrayList<AudioManager.OnAudioPortUpdateListener> listeners; in init()
76 listeners = new ArrayList<AudioManager.OnAudioPortUpdateListener>(); in init()
78 listeners.add((AudioManager.OnAudioPortUpdateListener)msg.obj); in init()
89 AudioManager.resetAudioPortGeneration(); in init()
99 int status = AudioManager.updateAudioPortCache(ports, patches, null); in init()
100 if (status != AudioManager.SUCCESS) { in init()
159 void registerListener(AudioManager.OnAudioPortUpdateListener l) { in registerListener()
169 void unregisterListener(AudioManager.OnAudioPortUpdateListener l) { in unregisterListener()
/frameworks/base/core/java/android/preference/
DSeekBarVolumizer.java28 import android.media.AudioManager;
74 private final AudioManager.VolumeGroupCallback mVolumeGroupCallback =
75 new AudioManager.VolumeGroupCallback() {
94 private final AudioManager mAudioManager;
147 mAudioManager = context.getSystemService(AudioManager.class); in SeekBarVolumizer()
180 if (mStreamType == AudioManager.STREAM_RING) { in SeekBarVolumizer()
182 } else if (mStreamType == AudioManager.STREAM_NOTIFICATION) { in SeekBarVolumizer()
192 return AudioManager.getAudioProductStrategies().size() > 0; in hasAudioProductStrategies()
197 AudioManager.getAudioProductStrategies()) { in getVolumeGroupIdForLegacyStreamType()
204 return AudioManager.getAudioProductStrategies().stream() in getVolumeGroupIdForLegacyStreamType()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/volume/
DUtil.java20 import android.media.AudioManager;
36 AudioManager.FLAG_SHOW_UI,
37 AudioManager.FLAG_VIBRATE,
38 AudioManager.FLAG_PLAY_SOUND,
39 AudioManager.FLAG_ALLOW_RINGER_MODES,
40 AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE,
41 AudioManager.FLAG_SHOW_VIBRATE_HINT,
42 AudioManager.FLAG_SHOW_SILENT_HINT,
43 AudioManager.FLAG_FROM_KEY,
44 AudioManager.FLAG_SHOW_UI_WARNINGS,
/frameworks/base/media/java/android/media/audiopolicy/
DAudioVolumeGroupChangeHandler.java20 import android.media.AudioManager;
40 private final ArrayList<AudioManager.VolumeGroupCallback> mListeners =
41 new ArrayList<AudioManager.VolumeGroupCallback>();
73 ArrayList<AudioManager.VolumeGroupCallback> listeners; in init()
77 new ArrayList<AudioManager.VolumeGroupCallback>(); in init()
80 (AudioManager.VolumeGroupCallback) msg.obj); in init()
121 public void registerListener(@NonNull AudioManager.VolumeGroupCallback cb) { in registerListener()
136 public void unregisterListener(@NonNull AudioManager.VolumeGroupCallback cb) { in unregisterListener()
/frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/
DScoAudioTest.java29 import android.media.AudioManager;
61 AudioManager mAudioManager;
62 AudioManager mAudioManager2;
105 intentFilter.addAction(AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED); in onCreate()
106 intentFilter.addAction(AudioManager.ACTION_SCO_AUDIO_STATE_UPDATED); in onCreate()
109 mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in onCreate()
110 … mAudioManager2 = (AudioManager) getApplicationContext().getSystemService(Context.AUDIO_SERVICE); in onCreate()
114 R.raw.sine440_mo_16b_16k, AudioManager.STREAM_BLUETOOTH_SCO); in onCreate()
134 String.valueOf(AudioManager.STREAM_BLUETOOTH_SCO)); in onCreate()
186 mAudioManager.setStreamVolume(AudioManager.STREAM_BLUETOOTH_SCO, in onPause()
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/
DTonesAutoTest.java24 import android.media.AudioManager;
40 toneGen = new ToneGenerator(AudioManager.STREAM_MUSIC, 100); in tonesDtmfTest()
64 toneGen = new ToneGenerator(AudioManager.STREAM_MUSIC, 100); in tonesSupervisoryTest()
101 toneGen = new ToneGenerator(AudioManager.STREAM_MUSIC, 100); in tonesProprietaryTest()
126 toneGen1 = new ToneGenerator(AudioManager.STREAM_MUSIC, 100); in tonesSimultaneousTest()
127 toneGen2 = new ToneGenerator(AudioManager.STREAM_MUSIC, 50); in tonesSimultaneousTest()
156 toneGen = new ToneGenerator(AudioManager.STREAM_MUSIC, 100); in tonesStressTest()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DVolumeDialogControllerImpl.java19 import static android.media.AudioManager.RINGER_MODE_NORMAL;
32 import android.media.AudioManager;
115 private AudioManager mAudio;
152 mAudio = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in VolumeDialogControllerImpl()
170 public AudioManager getAudioManager() { in getAudioManager()
351 mAudioService.playSoundEffect(AudioManager.FX_KEYPRESS_STANDARD); in playTouchFeedback()
430 if (stream == AudioManager.STREAM_MUSIC) { in checkRoutedToBluetoothW()
432 (mAudio.getDevicesForStream(AudioManager.STREAM_MUSIC) & in checkRoutedToBluetoothW()
433 (AudioManager.DEVICE_OUT_BLUETOOTH_A2DP | in checkRoutedToBluetoothW()
434 AudioManager.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | in checkRoutedToBluetoothW()
[all …]
DUtil.java19 import android.media.AudioManager;
34 case AudioManager.RINGER_MODE_SILENT: in ringerModeToString()
36 case AudioManager.RINGER_MODE_VIBRATE: in ringerModeToString()
38 case AudioManager.RINGER_MODE_NORMAL: in ringerModeToString()
DVolumeDialogImpl.java20 import static android.media.AudioManager.RINGER_MODE_NORMAL;
21 import static android.media.AudioManager.RINGER_MODE_SILENT;
22 import static android.media.AudioManager.RINGER_MODE_VIBRATE;
23 import static android.media.AudioManager.STREAM_ACCESSIBILITY;
24 import static android.media.AudioManager.STREAM_ALARM;
25 import static android.media.AudioManager.STREAM_MUSIC;
26 import static android.media.AudioManager.STREAM_RING;
27 import static android.media.AudioManager.STREAM_VOICE_CALL;
53 import android.media.AudioManager;
286 addRow(AudioManager.STREAM_MUSIC, in initDialog()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DSarManager.java31 import android.media.AudioManager;
152 AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in isVoiceCallOnEarpiece()
154 return (audioManager.getDevicesForStream(AudioManager.STREAM_VOICE_CALL) in isVoiceCallOnEarpiece()
155 == AudioManager.DEVICE_OUT_EARPIECE); in isVoiceCallOnEarpiece()
159 return AudioSystem.isStreamActive(AudioManager.STREAM_VOICE_CALL, 0); in isVoiceCallStreamActive()
260 filter.addAction(AudioManager.STREAM_DEVICES_CHANGED_ACTION); in registerVoiceStreamListener()
274 intent.getIntExtra(AudioManager.EXTRA_VOLUME_STREAM_TYPE, -1); in registerVoiceStreamListener()
276 AudioManager.EXTRA_VOLUME_STREAM_DEVICES, -1); in registerVoiceStreamListener()
278 AudioManager.EXTRA_PREV_VOLUME_STREAM_DEVICES, -1); in registerVoiceStreamListener()
280 if (streamType == AudioManager.STREAM_VOICE_CALL) { in registerVoiceStreamListener()
[all …]
/frameworks/base/cmds/media/src/com/android/commands/media/
DVolumeCtrl.java21 import android.media.AudioManager;
70 int stream = AudioManager.STREAM_MUSIC; in run()
73 int adjDir = AudioManager.ADJUST_RAISE; in run()
117 case ADJUST_RAISE: adjDir = AudioManager.ADJUST_RAISE; break; in run()
118 case ADJUST_SAME: adjDir = AudioManager.ADJUST_SAME; break; in run()
119 case ADJUST_LOWER: adjDir = AudioManager.ADJUST_LOWER; break; in run()
152 final int flag = showUi? AudioManager.FLAG_SHOW_UI : 0; in run()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/volume/
DVolumeDialogControllerImplTest.java26 import android.media.AudioManager;
57 mVolumeController.onVolumeChangedW(0, AudioManager.FLAG_SHOW_UI); in testVolumeChangeW_deviceNotInteractiveAOD()
65 mVolumeController.onVolumeChangedW(0, AudioManager.FLAG_SHOW_UI); in testVolumeChangeW_deviceInteractive()
73 mVolumeController.onVolumeChangedW(0, AudioManager.FLAG_SHOW_UI); in testVolumeChangeW_deviceInteractive_StartedSleeping()
76 mVolumeController.onVolumeChangedW(0, AudioManager.FLAG_SHOW_UI); in testVolumeChangeW_deviceInteractive_StartedSleeping()
86 nullStatusBarTestableDialog.onVolumeChangedW(0, AudioManager.FLAG_SHOW_UI); in testVolumeChangeW_nullStatusBar()

123456