Home
last modified time | relevance | path

Searched refs:mAudioManager (Results 1 – 25 of 94) sorted by relevance

1234

/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DCallAudioModeStateMachineTest.java50 @Mock private AudioManager mAudioManager; field in CallAudioModeStateMachineTest
75 mAudioManager, mTestThread.getLooper()); in testNoFocusWhenRingerSilenced()
95 verify(mAudioManager, never()).requestAudioFocusForCall(anyInt(), anyInt()); in testNoFocusWhenRingerSilenced()
96 verify(mAudioManager, never()).setMode(anyInt()); in testNoFocusWhenRingerSilenced()
107 mAudioManager, mTestThread.getLooper()); in testNoRingWhenDeviceIsAtEar()
133 verify(mAudioManager, never()).requestAudioFocusForCall(anyInt(), anyInt()); in testNoRingWhenDeviceIsAtEar()
134 verify(mAudioManager, never()).setMode(anyInt()); in testNoRingWhenDeviceIsAtEar()
143 mAudioManager, mTestThread.getLooper()); in testRegainFocusWhenHfpIsConnectedSilenced()
163 verify(mAudioManager, never()).requestAudioFocusForCall(anyInt(), anyInt()); in testRegainFocusWhenHfpIsConnectedSilenced()
164 verify(mAudioManager, never()).setMode(anyInt()); in testRegainFocusWhenHfpIsConnectedSilenced()
[all …]
DCallRecordingTonePlayerTest.java71 @Mock private AudioManager mAudioManager; field in CallRecordingTonePlayerTest
80 mAudioManager, mSyncRoot); in setUp()
81 when(mAudioManager.getActiveRecordingConfigurations()).thenReturn(null); in setUp()
170 verify(mAudioManager).getActiveRecordingConfigurations(); in testRecordingCallbackRegistered()
173 verify(mAudioManager).registerAudioRecordingCallback( in testRecordingCallbackRegistered()
179 verify(mAudioManager).unregisterAudioRecordingCallback( in testRecordingCallbackRegistered()
191 when(mAudioManager.getActiveRecordingConfigurations()).thenReturn( in testIsRecordingInitial()
197 verify(mAudioManager).getActiveRecordingConfigurations(); in testIsRecordingInitial()
210 when(mAudioManager.getActiveRecordingConfigurations()).thenReturn( null); in testIsRecordingLater()
217 verify(mAudioManager).registerAudioRecordingCallback(callbackCaptor.capture(), any()); in testIsRecordingLater()
[all …]
/packages/apps/Settings/src/com/android/settings/notification/
DAudioHelper.java36 private AudioManager mAudioManager; field in AudioHelper
40 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in AudioHelper()
60 return mAudioManager.getRingerModeInternal(); in getRingerModeInternal()
64 return mAudioManager.getLastAudibleStreamVolume(stream); in getLastAudibleStreamVolume()
68 return mAudioManager.getStreamVolume(stream); in getStreamVolume()
72 mAudioManager.setStreamVolume(stream, volume, 0); in setStreamVolume()
77 return mAudioManager.getStreamMaxVolume(stream); in getMaxVolume()
83 minVolume = mAudioManager.getStreamMinVolume(stream); in getMinVolume()
88 minVolume = mAudioManager.getStreamMinVolume(AudioManager.STREAM_VOICE_CALL); in getMinVolume()
DVolumeSeekBarPreference.java56 AudioManager mAudioManager; field in VolumeSeekBarPreference
62 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in VolumeSeekBarPreference()
68 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in VolumeSeekBarPreference()
74 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in VolumeSeekBarPreference()
80 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in VolumeSeekBarPreference()
85 setMax(mAudioManager.getStreamMaxVolume(mStream)); in setStream()
88 setMin(mAudioManager.getStreamMinVolumeInt(mStream)); in setStream()
89 setProgress(mAudioManager.getStreamVolume(mStream)); in setStream()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DAvailableMediaBluetoothDeviceUpdaterTest.java69 private AudioManager mAudioManager; field in AvailableMediaBluetoothDeviceUpdaterTest
79 mAudioManager = mContext.getSystemService(AudioManager.class); in setUp()
101 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in onAudioModeChanged_hfpDeviceConnected_inCall_addPreference()
114 mAudioManager.setMode(AudioManager.MODE_NORMAL); in onAudioModeChanged_hfpDeviceConnected_notInCall_removePreference()
127 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in onAudioModeChanged_a2dpDeviceConnected_inCall_removePreference()
140 mAudioManager.setMode(AudioManager.MODE_NORMAL); in onAudioModeChanged_a2dpDeviceConnected_notInCall_addPreference()
153 mAudioManager.setMode(AudioManager.MODE_NORMAL); in onProfileConnectionStateChanged_a2dpDeviceConnected_notInCall_addPreference()
166 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in onProfileConnectionStateChanged_a2dpDeviceConnected_inCall_removePreference()
179 mAudioManager.setMode(AudioManager.MODE_NORMAL); in onProfileConnectionStateChanged_hfpDeviceConnected_notInCall_removePreference()
192 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in onProfileConnectionStateChanged_hfpDeviceConnected_inCall_addPreference()
[all …]
DConnectedBluetoothDeviceUpdaterTest.java72 private AudioManager mAudioManager; field in ConnectedBluetoothDeviceUpdaterTest
81 mAudioManager = mContext.getSystemService(AudioManager.class); in setUp()
101 mAudioManager.setMode(AudioManager.MODE_NORMAL); in onAudioModeChanged_hfpDeviceConnected_notInCall_addPreference()
114 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in onAudioModeChanged_hfpDeviceConnected_inCall_removePreference()
127 mAudioManager.setMode(AudioManager.MODE_NORMAL); in onAudioModeChanged_a2dpDeviceConnected_notInCall_removePreference()
140 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in onAudioModeChanged_a2dpDeviceConnected_inCall_addPreference()
153 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in onProfileConnectionStateChanged_a2dpDeviceConnected_inCall_addPreference()
166 mAudioManager.setMode(AudioManager.MODE_NORMAL); in onProfileConnectionStateChanged_a2dpDeviceConnected_notInCall_removePreference()
179 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in onProfileConnectionStateChanged_hfpDeviceConnected_inCall_removePreference()
192 mAudioManager.setMode(AudioManager.MODE_NORMAL); in onProfileConnectionStateChanged_hfpDeviceConnected_notInCall_addPreference()
[all …]
/packages/services/Telephony/src/com/android/services/telephony/
DEmergencyTonePlayer.java52 private final AudioManager mAudioManager; field in EmergencyTonePlayer
61 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in EmergencyTonePlayer()
85 int ringerMode = mAudioManager.getRingerMode(); in startVibrate()
105 int ringerMode = mAudioManager.getRingerMode(); in startAlert()
116 mSavedInCallVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_VOICE_CALL); in startAlert()
117 mAudioManager.setStreamVolume( in startAlert()
119 mAudioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL), in startAlert()
131 mAudioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL, mSavedInCallVolume, 0); in stopAlert()
/packages/apps/DeskClock/src/com/android/deskclock/
DAsyncRingtonePlayer.java264 private AudioManager mAudioManager;
285 if (mAudioManager == null) {
286 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
343 if (mAudioManager.getStreamVolume(STREAM_ALARM) == 0) {
372 mAudioManager.requestAudioFocus(null, STREAM_ALARM, AUDIOFOCUS_GAIN_TRANSIENT);
397 if (mAudioManager != null) {
398 mAudioManager.abandonAudioFocus(null);
441 private AudioManager mAudioManager;
482 if (mAudioManager == null) {
483 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/
DCallAudioModeStateMachine.java232 mAudioManager.setMode(AudioManager.MODE_NORMAL); in enter()
281 mAudioManager.abandonAudioFocusForCall(); in processMessage()
295 mAudioManager.setMode(NEW_AUDIO_MODE_FOR_AUDIO_PROCESSING); in enter()
346 mAudioManager.abandonAudioFocusForCall(); in processMessage()
358 mAudioManager.requestAudioFocusForCall(AudioManager.STREAM_RING, in tryStartRinging()
362 if (mAudioManager.getMode() != NEW_AUDIO_MODE_FOR_AUDIO_PROCESSING) { in tryStartRinging()
363 mAudioManager.setMode(AudioManager.MODE_RINGTONE); in tryStartRinging()
447 mAudioManager.requestAudioFocusForCall(AudioManager.STREAM_VOICE_CALL, in enter()
449 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in enter()
528 mAudioManager.requestAudioFocusForCall(AudioManager.STREAM_VOICE_CALL, in enter()
[all …]
DCallRecordingTonePlayer.java64 private final AudioManager mAudioManager; field in CallRecordingTonePlayer
75 mAudioManager = audioManager; in CallRecordingTonePlayer()
125 handleRecordingConfigurationChange(mAudioManager.getActiveRecordingConfigurations()); in addCall()
126 mAudioManager.registerAudioRecordingCallback(mAudioRecordingCallback, in addCall()
143 mAudioManager.unregisterAudioRecordingCallback(mAudioRecordingCallback); in removeCall()
241 AudioDeviceInfo telephonyDevice = getTelephonyDevice(mAudioManager); in startCallRecordingTone()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DAudioHelper.java34 private AudioManager mAudioManager; field in AudioHelper
38 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in AudioHelper()
58 return mAudioManager.getRingerModeInternal(); in getRingerModeInternal()
62 return mAudioManager.getLastAudibleStreamVolume(stream); in getLastAudibleStreamVolume()
66 return mAudioManager.getStreamVolume(stream); in getStreamVolume()
70 mAudioManager.setStreamVolume(stream, volume, 0); in setStreamVolume()
75 return mAudioManager.getStreamMaxVolume(stream); in getMaxVolume()
DVolumeSeekBarPreference.java56 AudioManager mAudioManager; field in VolumeSeekBarPreference
62 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in VolumeSeekBarPreference()
68 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in VolumeSeekBarPreference()
74 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in VolumeSeekBarPreference()
80 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in VolumeSeekBarPreference()
90 setMax(mAudioManager.getStreamMaxVolume(mStream)); in setStream()
93 setMin(mAudioManager.getStreamMinVolumeInt(mStream)); in setStream()
94 setProgress(mAudioManager.getStreamVolume(mStream)); in setStream()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DVolumeSeekBarPreferenceTest.java38 private AudioManager mAudioManager; field in VolumeSeekBarPreferenceTest
47 when(mContext.getSystemService(Context.AUDIO_SERVICE)).thenReturn(mAudioManager); in setUp()
48 mPreference.mAudioManager = mAudioManager; in setUp()
57 when(mAudioManager.getStreamMaxVolume(stream)).thenReturn(max); in setStream_shouldSetMinMaxAndProgress()
58 when(mAudioManager.getStreamMinVolumeInt(stream)).thenReturn(min); in setStream_shouldSetMinMaxAndProgress()
59 when(mAudioManager.getStreamVolume(stream)).thenReturn(progress); in setStream_shouldSetMinMaxAndProgress()
/packages/apps/Settings/tests/robotests/src/com/android/settings/sound/
DHandsFreeProfileOutputPreferenceControllerTest.java102 private AudioManager mAudioManager; field in HandsFreeProfileOutputPreferenceControllerTest
120 mAudioManager = mContext.getSystemService(AudioManager.class); in setUp()
175 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in setActiveBluetoothDevice_btDeviceWithHisyncId_shouldSetBtDeviceActive()
190 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in setActiveBluetoothDevice_btDeviceWithoutHisyncId_shouldSetBtDeviceActive()
205 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in setActiveBluetoothDevice_setNull_shouldSetNullToBothProfiles()
219 mAudioManager.setMode(AudioManager.MODE_NORMAL); in setActiveBluetoothDevice_inNormalMode_shouldNotSetActiveDeviceToHeadsetProfile()
247 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in updateState_oneHeadsetsAvailableAndActivated_shouldSetDeviceName()
268 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in updateState_moreThanOneHfpBtDevicesAreAvailable_shouldSetActivatedDeviceName()
290 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in updateState_withAvailableDevicesWiredHeadsetActivated_shouldSetDefaultSummary()
310 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in updateState_noAvailableHeadsetBtDevices_shouldSetDefaultSummary()
[all …]
DMediaOutputPreferenceControllerTest.java102 private AudioManager mAudioManager; field in MediaOutputPreferenceControllerTest
120 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp()
177 mAudioManager.setMode(AudioManager.MODE_NORMAL); in updateState_withoutConnectedBtDevice_preferenceInvisible()
194 mAudioManager.setMode(AudioManager.MODE_NORMAL); in updateState_withConnectedBtDevice_preferenceVisible()
217 mAudioManager.setMode(AudioManager.MODE_NORMAL); in updateState_withConnectedBtDevice_withoutActiveBtDevice_setDefaultSummary()
237 mAudioManager.setMode(AudioManager.MODE_NORMAL); in updateState_withActiveBtDevice_setActivatedDeviceName()
257 mAudioManager.setMode(AudioManager.MODE_NORMAL); in updateState_withConnectedHADevice_preferenceVisible()
280 mAudioManager.setMode(AudioManager.MODE_NORMAL); in updateState_withActiveHADevice_setActivatedDeviceName()
326 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in updateState_duringACall_shouldSetDefaultSummary()
/packages/services/Car/service/src/com/android/car/audio/
DCarAudioService.java120 private final AudioManager mAudioManager; field in CarAudioService
155 setMasterMute(!mAudioManager.isMasterMute(), flags);
205 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in CarAudioService()
221 AudioDeviceInfo[] deviceInfos = mAudioManager.getDevices( in init()
261 mAudioManager.unregisterAudioPolicyAsync(mAudioPolicy); in release()
279 writer.println("\tMaster muted? " + mAudioManager.isMasterMute()); in dump()
319 mAudioManager.setStreamVolume( in setGroupVolume()
341 mAudioManager.setMasterMute(mute, flags); in setMasterMute()
346 mAudioManager.dispatchMediaKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, keycode)); in setMasterMute()
347 mAudioManager.dispatchMediaKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, keycode)); in setMasterMute()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DAudioAndHapticFeedbackManager.java35 private AudioManager mAudioManager; field in AudioAndHapticFeedbackManager
57 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in initInternal()
79 if (mSettingsValues == null || !mSettingsValues.mSoundOn || mAudioManager == null) { in reevaluateIfSoundIsOn()
82 return mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_NORMAL; in reevaluateIfSoundIsOn()
87 if (mAudioManager == null) { in performAudioFeedback()
108 mAudioManager.playSoundEffect(sound, mSettingsValues.mKeypressSoundVolume); in performAudioFeedback()
/packages/apps/TV/src/com/android/tv/audio/
DAudioManagerHelper.java36 private final AudioManager mAudioManager; field in AudioManagerHelper
44 mAudioManager = (AudioManager) activity.getSystemService(Context.AUDIO_SERVICE); in AudioManagerHelper()
117 result = mAudioManager.requestAudioFocus(mFocusRequest); in requestAudioFocus()
120 mAudioManager.requestAudioFocus( in requestAudioFocus()
134 mAudioManager.abandonAudioFocusRequest(mFocusRequest); in abandonAudioFocus()
136 mAudioManager.abandonAudioFocus(this); in abandonAudioFocus()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/audio/
DAudioTestFragment.java65 private AudioManager mAudioManager; field in AudioTestFragment
225 mAudioManager = (AudioManager) mContext.getSystemService( in onCreateView()
295 v -> mAudioManager.setSpeakerphoneOn(true)); in onCreateView()
297 v -> mAudioManager.setSpeakerphoneOn(false)); in onCreateView()
299 v -> mAudioManager.setMicrophoneMute(false)); in onCreateView()
301 v -> mAudioManager.setMicrophoneMute(true)); in onCreateView()
434 mAudioManager.requestAudioFocus(mNavFocusListener, mNavAudioAttrib, in handleNavStart()
446 mAudioManager.abandonAudioFocus(mNavFocusListener, mNavAudioAttrib); in handleNavEnd()
484 mAudioManager.requestAudioFocus(mVrFocusListener, mVrAudioAttrib, in handleVrStart()
496 mAudioManager.abandonAudioFocus(mVrFocusListener, mVrAudioAttrib); in handleVrEnd()
[all …]
DAudioPlayer.java90 private AudioManager mAudioManager; field in AudioPlayer
126 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in start()
133 ret = mAudioManager.requestAudioFocus(mFocusListener, mAttrib, in start()
167 mAudioManager.abandonAudioFocus(mFocusListener); in doStart()
181 mAudioManager.abandonAudioFocus(mFocusListener); in doStart()
207 AudioDeviceInfo[] devices = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS); in doStart()
230 mAudioManager.abandonAudioFocus(mFocusListener); in stop()
/packages/apps/Bluetooth/src/com/android/bluetooth/avrcp/
DAvrcpVolumeManager.java51 AudioManager mAudioManager; field in AvrcpVolumeManager
77 mAudioManager.avrcpSupportsAbsoluteVolume(device.getAddress(), mDeviceMap.get(device)); in switchVolumeDevice()
96 mAudioManager = audioManager; in AvrcpVolumeManager()
98 sDeviceMaxVolume = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in AvrcpVolumeManager()
101 mAudioManager.registerAudioDeviceCallback(this, null); in AvrcpVolumeManager()
138 int storeVolume = mAudioManager.getLastAudibleStreamVolume(STREAM_MUSIC); in storeVolumeForDevice()
178 mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, deviceVolume, in setVolume()
273 sb.append(" Current System Volume: " + mAudioManager.getStreamVolume(STREAM_MUSIC) + "\n"); in dump()
/packages/apps/Messaging/src/com/android/messaging/util/
DNotificationPlayer.java110 mAudioManager = audioManager; in run()
164 if (cmd.releaseFocus && mAudioManager != null) { in stopSound()
165 mAudioManager.abandonAudioFocus(null); in stopSound()
167 mAudioManager = null; in stopSound()
222 if (mAudioManager != null) { in onCompletion()
223 mAudioManager.abandonAudioFocus(null); in onCompletion()
244 private AudioManager mAudioManager; field in NotificationPlayer
/packages/services/Car/tests/carservice_test/src/android/media/tests/
DAudioPolicyTest.java52 private AudioManager mAudioManager; field in AudioPolicyTest
61 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp()
70 mAudioManager.registerAudioPortUpdateListener(listener); in testAudioPorts()
78 mAudioManager.registerAudioPolicy(audioPolicy); in testAudioPorts()
80 mAudioManager.unregisterAudioPolicyAsync(audioPolicy); in testAudioPorts()
82 mAudioManager.unregisterAudioPortUpdateListener(listener); in testAudioPorts()
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastAlertAudio.java131 private AudioManager mAudioManager; field in CellBroadcastAlertAudio
205 mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in onCreate()
300 mAudioManager.abandonAudioFocus(null); in onDestroy()
345 switch (mAudioManager.getRingerMode()) { in onStartCommand()
502 mAudioManager.requestAudioFocus(null, AudioManager.STREAM_ALARM, in playAlertTone()
656 AudioDeviceInfo[] deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS); in isOnEarphone()
678 mUserSetAlarmVolume = mAudioManager.getStreamVolume(streamType); in setAlarmStreamVolumeToFull()
680 mAudioManager.setStreamVolume(streamType, in setAlarmStreamVolumeToFull()
681 mAudioManager.getStreamMaxVolume(streamType), 0); in setAlarmStreamVolumeToFull()
690 mAudioManager.setStreamVolume(alertType == AlertType.INFO in resetAlarmStreamVolume()
/packages/services/Car/tests/carservice_test/src/com/android/car/audio/
DAudioFocusTest.java85 private AudioManager mAudioManager; field in AudioFocusTest
89 mAudioManager = new AudioManager(ApplicationProvider.getApplicationContext()); in setUp()
376 int requestResult = mAudioManager.requestAudioFocus(audioFocusRequest1); in testInteraction()
382 requestResult = mAudioManager.requestAudioFocus(audioFocusRequest2); in testInteraction()
390 requestResult = mAudioManager.abandonAudioFocusRequest(audioFocusRequest1); in testInteraction()
406 requestResult = mAudioManager.abandonAudioFocusRequest(audioFocusRequest2); in testInteraction()
428 requestResult = mAudioManager.abandonAudioFocusRequest(audioFocusRequest1); in testInteraction()
450 int requestResult = mAudioManager.requestAudioFocus(audioFocusRequest); in requestAndLoseFocusForAttribute()
462 requestResult = mAudioManager.abandonAudioFocusRequest(audioFocusRequest); in requestAndLoseFocusForAttribute()

1234