Home
last modified time | relevance | path

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

12

/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/audio/
DMediaAudioManagerTest.java38 private AudioManager mAudioManager; field in MediaAudioManagerTest
57 mAudioManager = (AudioManager)getActivity().getSystemService(Context.AUDIO_SERVICE); in initializeAudioManagerWithLooper()
98 int getRingtone = mAudioManager.getRingerMode(); in validateSetRingTone()
113 mAudioManager.setRingerMode(ringtoneMode[i]); in testSetRingtoneMode()
145 int result = mAudioManager.requestAudioFocus(mAudioFocusListener, in verifyAudioFocusLoss()
151 result = mAudioManager.requestAudioFocus(null, AudioManager.STREAM_MUSIC, in verifyAudioFocusLoss()
164 mAudioManager.registerAudioFocusListener(mAudioFocusListener); in setupAudioFocusListener()
169 mAudioManager.abandonAudioFocus(mAudioFocusListener); in cleanupAudioFocusListener()
170 mAudioManager.unregisterAudioFocusListener(mAudioFocusListener); in cleanupAudioFocusListener()
218 int result = mAudioManager.requestAudioFocus(mAudioFocusListener, in testAudioFocusStressListenerRequestAbandon()
[all …]
/frameworks/base/core/java/android/preference/
DSeekBarVolumizer.java60 private final AudioManager mAudioManager; field in SeekBarVolumizer
92 mAudioManager = context.getSystemService(AudioManager.class); in SeekBarVolumizer()
95 mAffectedByRingerMode = mAudioManager.isStreamAffectedByRingerMode(mStreamType); in SeekBarVolumizer()
98 mRingerMode = mAudioManager.getRingerModeInternal(); in SeekBarVolumizer()
101 mMaxStreamVolume = mAudioManager.getStreamMaxVolume(mStreamType); in SeekBarVolumizer()
103 mOriginalStreamVolume = mAudioManager.getStreamVolume(mStreamType); in SeekBarVolumizer()
104 mLastAudibleStreamVolume = mAudioManager.getLastAudibleStreamVolume(mStreamType); in SeekBarVolumizer()
105 mMuted = mAudioManager.isStreamMute(mStreamType); in SeekBarVolumizer()
160 mAudioManager.adjustStreamVolume(mStreamType, AudioManager.ADJUST_UNMUTE, 0); in handleMessage()
162 mAudioManager.adjustStreamVolume(mStreamType, AudioManager.ADJUST_MUTE, 0); in handleMessage()
[all …]
/frameworks/support/media-compat/jellybean-mr2/android/support/v4/media/
DTransportMediatorJellybeanMR2.java33 final AudioManager mAudioManager; field in TransportMediatorJellybeanMR2
99 mAudioManager = audioManager; in TransportMediatorJellybeanMR2()
133 mAudioManager.registerMediaButtonEventReceiver(mPendingIntent); in gainFocus()
134 mAudioManager.registerRemoteControlClient(mRemoteControl); in gainFocus()
144 mAudioManager.requestAudioFocus(mAudioFocusChangeListener, in takeAudioFocus()
186 mAudioManager.abandonAudioFocus(mAudioFocusChangeListener); in dropAudioFocus()
194 mAudioManager.unregisterRemoteControlClient(mRemoteControl); in loseFocus()
195 mAudioManager.unregisterMediaButtonEventReceiver(mPendingIntent); in loseFocus()
/frameworks/base/tests/FixVibrateSetting/src/com/android/fixvibratesetting/
DFixVibrateSetting.java32 AudioManager mAudioManager; field in FixVibrateSetting
45 mAudioManager = (AudioManager)getSystemService(AUDIO_SERVICE); in onCreate()
68 int setting = mAudioManager.getVibrateSetting(vibrateType); in getSettingValue()
102 mAudioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION, in fix()
107 mAudioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION, in unfix()
/frameworks/base/services/tests/servicestests/src/com/android/server/notification/
DBuzzBeepBlinkTest.java50 @Mock AudioManager mAudioManager; field in BuzzBeepBlinkTest
69 when(mAudioManager.isAudioFocusExclusive()).thenReturn(false); in setUp()
70 when(mAudioManager.getRingtonePlayer()).thenReturn(mRingtonePlayer); in setUp()
71 when(mAudioManager.getStreamVolume(anyInt())).thenReturn(10); in setUp()
72 when(mAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_NORMAL); in setUp()
75 mService.setAudioManager(mAudioManager); in setUp()
375 when(mAudioManager.getStreamVolume(anyInt())).thenReturn(0); in testDemoteSoundToVibrate()
376 when(mAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_VIBRATE); in testDemoteSoundToVibrate()
389 when(mAudioManager.getStreamVolume(anyInt())).thenReturn(0); in testDemotInsistenteSoundToVibrate()
390 when(mAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_VIBRATE); in testDemotInsistenteSoundToVibrate()
[all …]
/frameworks/base/packages/Keyguard/src/com/android/keyguard/
DObscureSpeechDelegate.java41 private final AudioManager mAudioManager; field in ObscureSpeechDelegate
45 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in ObscureSpeechDelegate()
95 if (mAudioManager.isWiredHeadsetOn() || mAudioManager.isBluetoothA2dpOn()) { in shouldObscureSpeech()
DKeyguardHostView.java58 private AudioManager mAudioManager; field in KeyguardHostView
348 if (mAudioManager == null) { in interceptMediaKey()
349 mAudioManager = (AudioManager) getContext().getSystemService( in interceptMediaKey()
355 mAudioManager.adjustSuggestedStreamVolume( in interceptMediaKey()
391 if (mAudioManager == null) { in handleMediaKeyEvent()
392 mAudioManager = (AudioManager) getContext().getSystemService( in handleMediaKeyEvent()
396 mAudioManager.dispatchMediaKeyEvent(keyEvent); in handleMediaKeyEvent()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DSafetyWarningDialog.java39 private final AudioManager mAudioManager; field in SafetyWarningDialog
47 mAudioManager = audioManager; in SafetyWarningDialog()
77 mAudioManager.disableSafeMediaVolume(); in onKeyUp()
85 mAudioManager.disableSafeMediaVolume(); in onClick()
DVolumeUI.java59 private AudioManager mAudioManager; field in VolumeUI
70 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in start()
111 mAudioManager.setVolumeController(null); in setDefaultVolumeController()
/frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/
DScoAudioTest.java61 AudioManager mAudioManager; field in ScoAudioTest
109 mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in onCreate()
152 mCurrentMode = mAudioManager.getMode(); in onCreate()
186 mAudioManager.setStreamVolume(AudioManager.STREAM_BLUETOOTH_SCO, in onPause()
195 mOriginalVoiceVolume = mAudioManager.getStreamVolume( in onResume()
198 mCurrentMode = mAudioManager.getMode(); in onResume()
209 AudioManager mngr = mAudioManager;
569 mAudioManager.setStreamVolume(AudioManager.STREAM_BLUETOOTH_SCO, in onUtteranceCompleted()
580 mAudioManager.setStreamVolume(AudioManager.STREAM_BLUETOOTH_SCO, in onUtteranceCompleted()
602 mOriginalVoiceVolume = mAudioManager.getStreamVolume(
[all …]
/frameworks/base/media/java/android/media/
DRingtone.java62 private final AudioManager mAudioManager; field in Ringtone
91 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in Ringtone()
93 mRemotePlayer = allowRemote ? mAudioManager.getRingtonePlayer() : null; in Ringtone()
328 if (mAudioManager.getStreamVolume( in play()
413 if (mAudioManager.getStreamVolume(AudioAttributes.toLegacyStreamType(mAudioAttributes)) in playFallbackRingtone()
/frameworks/base/services/core/java/com/android/server/tv/
DTvInputHardwareManager.java97 private final AudioManager mAudioManager; field in TvInputHardwareManager
124 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in TvInputHardwareManager()
506 mCurrentMaxIndex = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in updateVolume()
507 mCurrentIndex = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); in updateVolume()
746 mAudioManager.releaseAudioPatch(mAudioPatch);
770 mAudioManager.registerAudioPortUpdateListener(mAudioListener); in TvInputHardwareImpl()
780 if (mAudioManager.listAudioDevicePorts(devicePorts) != AudioManager.SUCCESS) { in findAudioSinkFromAudioPolicy()
783 int sinkDevice = mAudioManager.getDevicesForStream(AudioManager.STREAM_MUSIC); in findAudioSinkFromAudioPolicy()
797 if (mAudioManager.listAudioDevicePorts(devicePorts) != AudioManager.SUCCESS) { in findAudioDevicePort()
810 mAudioManager.unregisterAudioPortUpdateListener(mAudioListener); in release()
[all …]
/frameworks/base/core/java/com/android/internal/policy/
DPhoneFallbackEventHandler.java47 AudioManager mAudioManager; field in PhoneFallbackEventHandler
300 if (mAudioManager == null) { in getAudioManager()
301 mAudioManager = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE); in getAudioManager()
303 return mAudioManager; in getAudioManager()
/frameworks/support/media-compat/java/android/support/v4/media/
DTransportMediator.java50 final AudioManager mAudioManager; field in TransportMediator
162 mAudioManager = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE); in TransportMediator()
166 mController = new TransportMediatorJellybeanMR2(mContext, mAudioManager, in TransportMediator()
/frameworks/support/v7/mediarouter/src/android/support/v7/media/
DSystemMediaRouteProvider.java118 private final AudioManager mAudioManager; field in SystemMediaRouteProvider.LegacyImpl
124 mAudioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE); in LegacyImpl()
134 int maxVolume = mAudioManager.getStreamMaxVolume(PLAYBACK_STREAM); in publishRoutes()
135 mLastReportedVolume = mAudioManager.getStreamVolume(PLAYBACK_STREAM); in publishRoutes()
164 mAudioManager.setStreamVolume(PLAYBACK_STREAM, volume, 0); in onSetVolume()
170 int volume = mAudioManager.getStreamVolume(PLAYBACK_STREAM); in onUpdateVolume()
171 int maxVolume = mAudioManager.getStreamMaxVolume(PLAYBACK_STREAM); in onUpdateVolume()
174 mAudioManager.setStreamVolume(PLAYBACK_STREAM, volume, 0); in onUpdateVolume()
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsHelper.java46 private AudioManager mAudioManager; field in SettingsHelper
96 mAudioManager = (AudioManager) context in SettingsHelper()
288 mAudioManager.loadSoundEffects(); in setSoundEffects()
290 mAudioManager.unloadSoundEffects(); in setSoundEffects()
/frameworks/support/samples/Support4Demos/src/com/example/android/supportv4/media/
DPlayback.java76 private AudioManager mAudioManager; field in Playback
100 this.mAudioManager = (AudioManager) service.getSystemService(Context.AUDIO_SERVICE); in Playback()
245 int result = mAudioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, in tryToGetAudioFocus()
259 if (mAudioManager.abandonAudioFocus(this) == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) { in giveUpAudioFocus()
/frameworks/base/services/core/java/com/android/server/policy/
DGlobalActions.java110 private final AudioManager mAudioManager; field in GlobalActions
135 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in GlobalActions()
221 mSilentModeAction = new SilentModeTriStateAction(mContext, mAudioManager, mHandler); in createDialog()
630 mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_NORMAL;
981 mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);
983 mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
1000 private final AudioManager mAudioManager;
1005 mAudioManager = audioManager;
1029 int selectedIndex = ringerModeToIndex(mAudioManager.getRingerMode());
1062 mAudioManager.setRingerMode(indexToRingerMode(index));
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DKeyButtonView.java59 private AudioManager mAudioManager; field in KeyButtonView
104 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in KeyButtonView()
236 mAudioManager.playSoundEffect(soundConstant, ActivityManager.getCurrentUser()); in playSoundEffect()
/frameworks/base/services/core/java/com/android/server/
DWiredAccessoryManager.java78 private final AudioManager mAudioManager; field in WiredAccessoryManager
93 mAudioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE); in WiredAccessoryManager()
293 mAudioManager.setWiredDeviceConnectionState(outDevice, state, "", headsetName); in setDeviceStateLocked()
296 mAudioManager.setWiredDeviceConnectionState(inDevice, state, "", headsetName); in setDeviceStateLocked()
/frameworks/base/services/core/java/com/android/server/notification/
DZenModeHelper.java103 private AudioManagerInternal mAudioManager; field in ZenModeHelper
187 mAudioManager = LocalServices.getService(AudioManagerInternal.class); in onSystemReady()
188 if (mAudioManager != null) { in onSystemReady()
189 mAudioManager.setRingerModeDelegate(mRingerModeDelegate); in onSystemReady()
706 if (mAudioManager != null) { in updateRingerModeAffectedStreams()
707 mAudioManager.updateRingerModeAffectedStreamsInternal(); in updateRingerModeAffectedStreams()
761 if (mAudioManager == null) return; in applyZenToRingerMode()
763 final int ringerModeInternal = mAudioManager.getRingerModeInternal(); in applyZenToRingerMode()
782 mAudioManager.setRingerModeInternal(newRingerModeInternal, TAG); in applyZenToRingerMode()
/frameworks/base/tests/OneMedia/src/com/android/onemedia/playback/
DLocalRenderer.java191 private AudioManager mAudioManager; field in LocalRenderer
226 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in LocalRenderer()
477 int result = mAudioManager.requestAudioFocus(this, AudioManager.STREAM_MUSIC, in requestAudioFocus()
700 mAudioManager.abandonAudioFocus(this); in cleanUpPlayer()
/frameworks/base/services/retaildemo/java/com/android/server/retaildemo/
DRetailDemoModeService.java111 private AudioManager mAudioManager; field in RetailDemoModeService
401 if (mAudioManager == null) { in getAudioManager()
402 mAudioManager = getContext().getSystemService(AudioManager.class); in getAudioManager()
404 return mAudioManager; in getAudioManager()
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DSearchBar.java155 private AudioManager mAudioManager; field in SearchBar
196 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in SearchBar()
562 mAudioManager.abandonAudioFocus(mAudioFocusChangeListener); in stopRecognition()
605 int result = mAudioManager.requestAudioFocus(mAudioFocusChangeListener, in startRecognition()
/frameworks/support/media-compat/java/android/support/v4/media/session/
DMediaSessionCompat.java1257 private final AudioManager mAudioManager; field in MediaSessionCompat.MediaSessionImplBase
1321 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in MediaSessionImplBase()
1416 mAudioManager.getStreamMaxVolume(mLocalStream), in setPlaybackToLocal()
1417 mAudioManager.getStreamVolume(mLocalStream)); in setPlaybackToLocal()
1662 mAudioManager.adjustStreamVolume(mLocalStream, direction, flags); in adjustVolume()
1672 mAudioManager.setStreamVolume(mLocalStream, value, flags); in setVolumeTo()
1891 max = mAudioManager.getStreamMaxVolume(stream); in getVolumeAttributes()
1892 current = mAudioManager.getStreamVolume(stream); in getVolumeAttributes()

12