Home
last modified time | relevance | path

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

1234

/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DCallAudioModeStateMachineTest.java47 @Mock private AudioManager mAudioManager; field in CallAudioModeStateMachineTest
60 mAudioManager); in testNoFocusWhenRingerSilenced()
81 verify(mAudioManager, never()).requestAudioFocusForCall(anyInt(), anyInt()); in testNoFocusWhenRingerSilenced()
82 verify(mAudioManager, never()).setMode(anyInt()); in testNoFocusWhenRingerSilenced()
93 mAudioManager); in testNoRingWhenDeviceIsAtEar()
121 verify(mAudioManager, never()).requestAudioFocusForCall(anyInt(), anyInt()); in testNoRingWhenDeviceIsAtEar()
122 verify(mAudioManager, never()).setMode(anyInt()); in testNoRingWhenDeviceIsAtEar()
131 mAudioManager); in testRegainFocusWhenHfpIsConnectedSilenced()
152 verify(mAudioManager, never()).requestAudioFocusForCall(anyInt(), anyInt()); in testRegainFocusWhenHfpIsConnectedSilenced()
153 verify(mAudioManager, never()).setMode(anyInt()); in testRegainFocusWhenHfpIsConnectedSilenced()
[all …]
DCallRecordingTonePlayerTest.java70 @Mock private AudioManager mAudioManager; field in CallRecordingTonePlayerTest
79 mAudioManager, mSyncRoot); in setUp()
80 when(mAudioManager.getActiveRecordingConfigurations()).thenReturn(null); in setUp()
163 verify(mAudioManager).getActiveRecordingConfigurations(); in testRecordingCallbackRegistered()
166 verify(mAudioManager).registerAudioRecordingCallback( in testRecordingCallbackRegistered()
172 verify(mAudioManager).unregisterAudioRecordingCallback( in testRecordingCallbackRegistered()
184 when(mAudioManager.getActiveRecordingConfigurations()).thenReturn( in testIsRecordingInitial()
190 verify(mAudioManager).getActiveRecordingConfigurations(); in testIsRecordingInitial()
203 when(mAudioManager.getActiveRecordingConfigurations()).thenReturn( null); in testIsRecordingLater()
210 verify(mAudioManager).registerAudioRecordingCallback(callbackCaptor.capture(), any()); in testIsRecordingLater()
[all …]
DCallAudioModeTransitionTests.java102 @Mock private AudioManager mAudioManager; field in CallAudioModeTransitionTests
120 mAudioManager); in modeTransitionTest()
135 verify(mAudioManager, never()).requestAudioFocusForCall(anyInt(), anyInt()); in modeTransitionTest()
138 verify(mAudioManager).abandonAudioFocusForCall(); in modeTransitionTest()
141 verify(mAudioManager).requestAudioFocusForCall( in modeTransitionTest()
145 verify(mAudioManager).requestAudioFocusForCall( in modeTransitionTest()
151 verify(mAudioManager).setMode(eq(mParams.expectedMode)); in modeTransitionTest()
153 verify(mAudioManager, never()).setMode(anyInt()); in modeTransitionTest()
594 reset(mCallAudioManager, mAudioManager); in resetMocks()
/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.java56 private final AudioManager mAudioManager; field in EmergencyTonePlayer
64 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in EmergencyTonePlayer()
87 int ringerMode = mAudioManager.getRingerMode(); in startVibrate()
107 int ringerMode = mAudioManager.getRingerMode(); in startAlert()
118 mSavedInCallVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_VOICE_CALL); in startAlert()
119 mAudioManager.setStreamVolume( in startAlert()
121 mAudioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL), in startAlert()
133 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/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/Telecomm/src/com/android/server/telecom/
DCallAudioModeStateMachine.java163 mAudioManager.abandonAudioFocusForCall(); in enter()
164 mAudioManager.setMode(AudioManager.MODE_NORMAL); in enter()
215 mAudioManager.requestAudioFocusForCall(AudioManager.STREAM_RING, in tryStartRinging()
217 mAudioManager.setMode(AudioManager.MODE_RINGTONE); in tryStartRinging()
297 mAudioManager.requestAudioFocusForCall(AudioManager.STREAM_VOICE_CALL, in enter()
299 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in enter()
359 mAudioManager.requestAudioFocusForCall(AudioManager.STREAM_VOICE_CALL, in enter()
361 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in enter()
417 mAudioManager.requestAudioFocusForCall(AudioManager.STREAM_VOICE_CALL, in enter()
419 mAudioManager.setMode(mMostRecentMode); in enter()
[all …]
DCallRecordingTonePlayer.java62 private final AudioManager mAudioManager; field in CallRecordingTonePlayer
73 mAudioManager = audioManager; in CallRecordingTonePlayer()
123 handleRecordingConfigurationChange(mAudioManager.getActiveRecordingConfigurations()); in addCall()
124 mAudioManager.registerAudioRecordingCallback(mAudioRecordingCallback, in addCall()
141 mAudioManager.unregisterAudioRecordingCallback(mAudioRecordingCallback); in removeCall()
239 AudioDeviceInfo telephonyDevice = getTelephonyDevice(mAudioManager); in startCallRecordingTone()
/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/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastAlertAudio.java104 private AudioManager mAudioManager; field in CellBroadcastAlertAudio
226 mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in onCreate()
253 mAudioManager.abandonAudioFocus(null); in onDestroy()
286 switch (mAudioManager.getRingerMode()) { in onStartCommand()
444 mAudioManager.requestAudioFocus(null, AudioManager.STREAM_ALARM, in playAlertTone()
558 AudioDeviceInfo[] deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS); in isOnEarphone()
578 mUserSetAlarmVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_ALARM); in setAlarmStreamVolumeToFull()
580 mAudioManager.setStreamVolume(AudioManager.STREAM_ALARM, in setAlarmStreamVolumeToFull()
581 mAudioManager.getStreamMaxVolume(AudioManager.STREAM_ALARM), in setAlarmStreamVolumeToFull()
591 mAudioManager.setStreamVolume(AudioManager.STREAM_ALARM, mUserSetAlarmVolume, 0); in resetAlarmStreamVolume()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/audio/
DAudioTestFragment.java68 private AudioManager mAudioManager; field in AudioTestFragment
223 mAudioManager = (AudioManager) mContext.getSystemService( in onCreateView()
293 v -> mAudioManager.setSpeakerphoneOn(true)); in onCreateView()
295 v -> mAudioManager.setSpeakerphoneOn(false)); in onCreateView()
297 v -> mAudioManager.setMicrophoneMute(false)); in onCreateView()
299 v -> mAudioManager.setMicrophoneMute(true)); in onCreateView()
430 mAudioManager.requestAudioFocus(mNavFocusListener, mNavAudioAttrib, in handleNavStart()
442 mAudioManager.abandonAudioFocus(mNavFocusListener, mNavAudioAttrib); in handleNavEnd()
480 mAudioManager.requestAudioFocus(mVrFocusListener, mVrAudioAttrib, in handleVrStart()
492 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/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/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/Bluetooth/src/com/android/bluetooth/avrcp/
DAvrcpVolumeManager.java47 AudioManager mAudioManager; field in AvrcpVolumeManager
73 mAudioManager.avrcpSupportsAbsoluteVolume(device.getAddress(), mDeviceMap.get(device)); in switchVolumeDevice()
91 mAudioManager = audioManager; in AvrcpVolumeManager()
93 sDeviceMaxVolume = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in AvrcpVolumeManager()
96 mAudioManager.registerAudioDeviceCallback(this, null); in AvrcpVolumeManager()
123 int storeVolume = mAudioManager.getStreamVolume(STREAM_MUSIC); in storeVolumeForDevice()
225 sb.append(" Current System Volume: " + mAudioManager.getStreamVolume(STREAM_MUSIC) + "\n"); in dump()

1234