/frameworks/base/media/tests/AudioPolicyTest/src/com/android/audiopolicytest/ |
D | AudioManagerTest.java | 42 mAudioManager.getAudioProductStrategies(); in testGetAndValidateProductStrategies() 45 List<AudioVolumeGroup> audioVolumeGroups = mAudioManager.getAudioVolumeGroups(); in testGetAndValidateProductStrategies() 106 List<AudioVolumeGroup> audioVolumeGroups = mAudioManager.getAudioVolumeGroups(); in testGetAndValidateVolumeGroups() 110 mAudioManager.getAudioProductStrategies(); in testGetAndValidateVolumeGroups() 187 () -> mAudioManager.getMaxVolumeIndexForAttributes(nullAttributes)); in testSetGetVolumePerAttributesWithInvalidAttributes() 190 () -> mAudioManager.getMinVolumeIndexForAttributes(nullAttributes)); in testSetGetVolumePerAttributesWithInvalidAttributes() 193 () -> mAudioManager.getVolumeIndexForAttributes(nullAttributes)); in testSetGetVolumePerAttributesWithInvalidAttributes() 196 () -> mAudioManager.setVolumeIndexForAttributes( in testSetGetVolumePerAttributesWithInvalidAttributes() 212 indexMax = mAudioManager.getMaxVolumeIndexForAttributes(aaForUsage); in testSetGetVolumePerAttributes() 219 indexMin = mAudioManager.getMinVolumeIndexForAttributes(aaForUsage); in testSetGetVolumePerAttributes() [all …]
|
D | AudioVolumeGroupChangeHandlerTest.java | 84 List<AudioVolumeGroup> audioVolumeGroups = mAudioManager.getAudioVolumeGroups(); in testCallbackReceived() 101 int index = mAudioManager.getVolumeIndexForAttributes(aa); in testCallbackReceived() 102 int indexMax = mAudioManager.getMaxVolumeIndexForAttributes(aa); in testCallbackReceived() 103 int indexMin = mAudioManager.getMinVolumeIndexForAttributes(aa); in testCallbackReceived() 109 mAudioManager.setVolumeIndexForAttributes(aa, indexForAa, 0/*flags*/); in testCallbackReceived() 113 final int readIndex = mAudioManager.getVolumeIndexForAttributes(aa); in testCallbackReceived() 138 List<AudioVolumeGroup> audioVolumeGroups = mAudioManager.getAudioVolumeGroups(); in testMultipleCallbackReceived() 155 int index = mAudioManager.getVolumeIndexForAttributes(aa); in testMultipleCallbackReceived() 156 int indexMax = mAudioManager.getMaxVolumeIndexForAttributes(aa); in testMultipleCallbackReceived() 157 int indexMin = mAudioManager.getMinVolumeIndexForAttributes(aa); in testMultipleCallbackReceived() [all …]
|
D | AudioVolumesTestBase.java | 32 public AudioManager mAudioManager; field in AudioVolumesTestBase 52 List<AudioVolumeGroup> audioVolumeGroups = mAudioManager.getAudioVolumeGroups(); in storeAllVolumes() 72 avg.getId(), mAudioManager.getVolumeIndexForAttributes(avgAttributes)); in storeAllVolumes() 80 List<AudioVolumeGroup> audioVolumeGroups = mAudioManager.getAudioVolumeGroups(); in restoreAllVolumes() 93 mAudioManager.setVolumeIndexForAttributes( in restoreAllVolumes() 105 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 113 mOriginalStreamVolumes.put(streamType, mAudioManager.getStreamVolume(streamType)); in setUp() 126 mAudioManager.setStreamVolume(e.getKey(), e.getValue(), in tearDown()
|
D | AudioVolumeGroupTest.java | 49 final List<AudioVolumeGroup> audioVolumeGroup = mAudioManager.getAudioVolumeGroups(); in testGetVolumeGroups() 54 mAudioManager.getAudioProductStrategies(); in testGetVolumeGroups()
|
/frameworks/av/media/libaudioclient/ |
D | RecordingActivityTracker.cpp | 31 mAudioManager = interface_cast<IAudioManager>(binder); in RecordingActivityTracker() 39 if (mRIId != RECORD_RIID_INVALID && mAudioManager) { in ~RecordingActivityTracker() 40 mAudioManager->releaseRecorder(mRIId); in ~RecordingActivityTracker() 46 if (mRIId == RECORD_RIID_INVALID && mAudioManager) { in getRiid() 47 mRIId = mAudioManager->trackRecorder(mToken); in getRiid() 54 if (getRiid() != RECORD_RIID_INVALID && mAudioManager) { in recordingStarted() 55 mAudioManager->recorderEvent(mRIId, RECORDER_STATE_STARTED); in recordingStarted() 61 if (getRiid() != RECORD_RIID_INVALID && mAudioManager) { in recordingStopped() 62 mAudioManager->recorderEvent(mRIId, RECORDER_STATE_STOPPED); in recordingStopped()
|
D | PlayerBase.cpp | 42 mAudioManager = interface_cast<IAudioManager>(binder); in PlayerBase() 53 if (mAudioManager == 0) { in init() 56 mPIId = mAudioManager->trackPlayer(playerType, usage, AUDIO_CONTENT_TYPE_UNKNOWN, this, in init() 63 if (mAudioManager != 0) { in baseDestroy() 64 mAudioManager.clear(); in baseDestroy() 70 if (mAudioManager != 0) { in servicePlayerEvent() 88 mAudioManager->playerEvent(mPIId, event, deviceId); in servicePlayerEvent() 94 if (mAudioManager != 0 in serviceReleasePlayer() 96 mAudioManager->releasePlayer(mPIId); in serviceReleasePlayer()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/audio/ |
D | MediaAudioManagerTest.java | 38 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() 168 mAudioManager.abandonAudioFocus(mAudioFocusListener); in cleanupAudioFocusListener() 216 int result = mAudioManager.requestAudioFocus(mAudioFocusListener, in testAudioFocusStressListenerRequestAbandon() 231 mAudioManager.requestAudioFocus(mAudioFocusListener, AudioManager.STREAM_MUSIC, in testAudioFocusStressNoListenerRequestAbandon() 235 mAudioManager.requestAudioFocus(null, AudioManager.STREAM_MUSIC, in testAudioFocusStressNoListenerRequestAbandon() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/systemsounds/ |
D | HomeSoundEffectControllerTest.java | 58 private @Mock AudioManager mAudioManager; field in HomeSoundEffectControllerTest 90 mController = new HomeSoundEffectController(mContext, mAudioManager, in setUp() 104 verify(mAudioManager, never()).playSoundEffect(AudioManager.FX_HOME); in testHomeSoundEffectNotPlayedWhenHomeFirstMovesToFront() 126 verify(mAudioManager).playSoundEffect(AudioManager.FX_HOME); in testHomeSoundEffectPlayedWhenEnabled() 150 verify(mAudioManager).playSoundEffect(AudioManager.FX_HOME); in testHomeSoundEffectNotPlayedTwiceInRow() 156 verify(mAudioManager, times(1)).playSoundEffect(AudioManager.FX_HOME); in testHomeSoundEffectNotPlayedTwiceInRow() 169 verify(mAudioManager, never()).playSoundEffect(AudioManager.FX_HOME); in testHomeSoundEffectNotPlayedWhenNonHomeTaskMovesToFront() 192 verify(mAudioManager).playSoundEffect(AudioManager.FX_HOME); in testHomeSoundEffectNotPlayedWhenOtherHomeActivityMovesToFront() 198 verify(mAudioManager, times(1)).playSoundEffect(AudioManager.FX_HOME); in testHomeSoundEffectNotPlayedWhenOtherHomeActivityMovesToFront() 220 verify(mAudioManager, never()).playSoundEffect(AudioManager.FX_HOME); in testHomeSoundEffectNotPlayedWhenOtherHomeActivityMovesToFrontOfOtherApp() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/ |
D | BaseAbsoluteVolumeControlTest.java | 93 @Mock protected AudioManager mAudioManager; field in BaseAbsoluteVolumeControlTest 137 return mAudioManager; in setUp() 188 }).when(mAudioManager).setDeviceVolumeBehavior(any(), anyInt()); in setUp() 192 .when(mAudioManager).getDeviceVolumeBehavior(eq(getAudioOutputDevice())); in setUp() 195 doReturn(Collections.singletonList(getAudioOutputDevice())).when(mAudioManager) in setUp() 199 doReturn(25).when(mAudioManager).getStreamMaxVolume(AudioManager.STREAM_MUSIC); in setUp() 225 doReturn(behavior).when(mAudioManager).getDeviceVolumeBehavior(eq(device)); in setDeviceVolumeBehavior() 317 InOrder inOrder = inOrder(mAudioManager, mAudioDeviceVolumeManager); in verifyAbsoluteVolumeEnabled() 320 inOrder.verify(mAudioManager, never()).setDeviceVolumeBehavior( in verifyAbsoluteVolumeEnabled() 329 InOrder inOrder = inOrder(mAudioManager, mAudioDeviceVolumeManager); in verifyAbsoluteVolumeDisabled() [all …]
|
/frameworks/base/core/java/android/preference/ |
D | SeekBarVolumizer.java | 115 private final AudioManager mAudioManager; field in SeekBarVolumizer 175 mAudioManager = context.getSystemService(AudioManager.class); in SeekBarVolumizer() 186 mAffectedByRingerMode = mAudioManager.isStreamAffectedByRingerMode(mStreamType); in SeekBarVolumizer() 189 mRingerMode = mAudioManager.getRingerModeInternal(); in SeekBarVolumizer() 199 mMaxStreamVolume = mAudioManager.getStreamMaxVolume(mStreamType); in SeekBarVolumizer() 201 mOriginalStreamVolume = mAudioManager.getStreamVolume(mStreamType); in SeekBarVolumizer() 202 mLastAudibleStreamVolume = mAudioManager.getLastAudibleStreamVolume(mStreamType); in SeekBarVolumizer() 203 mMuted = mAudioManager.isStreamMute(mStreamType); in SeekBarVolumizer() 321 mAudioManager.adjustStreamVolume(mStreamType, AudioManager.ADJUST_UNMUTE, 0); in handleMessage() 323 mAudioManager.adjustStreamVolume(mStreamType, AudioManager.ADJUST_MUTE, 0); in handleMessage() [all …]
|
/frameworks/base/services/companion/java/com/android/server/companion/virtual/audio/ |
D | AudioPlaybackDetector.java | 41 private final AudioManager mAudioManager; field in AudioPlaybackDetector 45 mAudioManager = context.getSystemService(AudioManager.class); in AudioPlaybackDetector() 50 mAudioManager.registerAudioPlaybackCallback(/* cb= */ this, /* handler= */ null); in register() 56 mAudioManager.unregisterAudioPlaybackCallback(/* cb= */ this); in unregister()
|
D | AudioRecordingDetector.java | 41 private final AudioManager mAudioManager; field in AudioRecordingDetector 45 mAudioManager = context.getSystemService(AudioManager.class); in AudioRecordingDetector() 50 mAudioManager.registerAudioRecordingCallback(/* cb= */ this, /* handler= */ null); in register() 56 mAudioManager.unregisterAudioRecordingCallback(/* cb= */ this); in unregister()
|
/frameworks/opt/tv/tvsystem/java/com/android/libraries/tv/tvsystem/media/ |
D | TvAudioManager.java | 34 private final AudioManager mAudioManager; field in TvAudioManager 37 mAudioManager = context.getSystemService(AudioManager.class); in TvAudioManager() 58 mAudioManager.setDeviceVolumeBehavior(audioDeviceAttributes, deviceVolumeBehavior); in setDeviceVolumeBehavior() 74 return mAudioManager.getDeviceVolumeBehavior(audioDeviceAttributes); in getDeviceVolumeBehavior()
|
/frameworks/base/tests/FixVibrateSetting/src/com/android/fixvibratesetting/ |
D | FixVibrateSetting.java | 32 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/packages/SettingsLib/src/com/android/settingslib/media/ |
D | BluetoothMediaDevice.java | 38 private final AudioManager mAudioManager; field in BluetoothMediaDevice 44 mAudioManager = context.getSystemService(AudioManager.class); in BluetoothMediaDevice() 109 return mAudioManager.getMutingExpectedDevice() != null && mCachedDevice.getAddress().equals( in isMutingExpectedDevice() 110 mAudioManager.getMutingExpectedDevice().getAddress()); in isMutingExpectedDevice()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/ |
D | SafetyWarningDialog.java | 40 private final AudioManager mAudioManager; field in SafetyWarningDialog 49 mAudioManager = audioManager; in SafetyWarningDialog() 86 mAudioManager.disableSafeMediaVolume(); in onKeyUp() 94 mAudioManager.disableSafeMediaVolume(); in onClick()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/systemsounds/ |
D | HomeSoundEffectController.java | 46 private final AudioManager mAudioManager; field in HomeSoundEffectController 68 mAudioManager = audioManager; in HomeSoundEffectController() 80 if (mAudioManager.isHomeSoundEffectEnabled()) { in start() 170 mAudioManager.playSoundEffect(AudioManager.FX_HOME); in handleTaskStackChanged()
|
/frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/ |
D | ScoAudioTest.java | 61 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/services/tests/uiservicestests/src/com/android/server/notification/ |
D | ZenModeHelperTest.java | 572 AudioManagerInternal mAudioManager = mock(AudioManagerInternal.class); in testZenSetInternalRinger_AllPriorityNotificationSoundsMuted() local 573 mZenModeHelperSpy.mAudioManager = mAudioManager; in testZenSetInternalRinger_AllPriorityNotificationSoundsMuted() 578 when(mAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_NORMAL); in testZenSetInternalRinger_AllPriorityNotificationSoundsMuted() 590 verify(mAudioManager, never()).setRingerModeInternal(AudioManager.RINGER_MODE_SILENT, in testZenSetInternalRinger_AllPriorityNotificationSoundsMuted() 594 when(mAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_SILENT); in testZenSetInternalRinger_AllPriorityNotificationSoundsMuted() 597 verify(mAudioManager, atLeastOnce()).setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL, in testZenSetInternalRinger_AllPriorityNotificationSoundsMuted() 664 AudioManagerInternal mAudioManager = mock(AudioManagerInternal.class); in testZenSetInternalRinger_NotAllPriorityNotificationSoundsMuted_StartNormal() local 665 mZenModeHelperSpy.mAudioManager = mAudioManager; in testZenSetInternalRinger_NotAllPriorityNotificationSoundsMuted_StartNormal() 670 when(mAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_NORMAL); in testZenSetInternalRinger_NotAllPriorityNotificationSoundsMuted_StartNormal() 676 verify(mAudioManager, atLeastOnce()).setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL, in testZenSetInternalRinger_NotAllPriorityNotificationSoundsMuted_StartNormal() [all …]
|
/frameworks/base/media/java/android/media/ |
D | Ringtone.java | 66 private final AudioManager mAudioManager; field in Ringtone 103 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in Ringtone() 105 mRemotePlayer = allowRemote ? mAudioManager.getRingtonePlayer() : null; in Ringtone() 188 return mLocalPlayer.setPreferredDevice(getBuiltinDevice(mAudioManager)); in preferBuiltinDevice() 209 mPreferBuiltinDevice ? getBuiltinDevice(mAudioManager) : null); in createLocalMediaPlayer() 483 if (isHapticOnly || mAudioManager.getStreamVolume( in play() 579 if (mAudioManager.getStreamVolume(streamType) == 0) { in playFallbackRingtone()
|
/frameworks/wilhelm/src/objects/ |
D | CEngine.cpp | 82 thiz->mAudioManager = android::interface_cast<android::IAudioManager>(binder); in CEngine_Realize() 141 if (thiz->mAudioManager != 0) { in CEngine_Destroy() 142 thiz->mAudioManager.clear(); in CEngine_Destroy()
|
/frameworks/base/services/core/java/com/android/server/media/ |
D | SystemMediaRoute2Provider.java | 70 private final AudioManager mAudioManager; field in SystemMediaRoute2Provider 118 mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); in SystemMediaRoute2Provider() 236 mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, volume, 0); in setRouteVolume() 299 .setVolumeHandling(mAudioManager.isVolumeFixed() in updateDeviceRoute() 303 .setVolumeMax(mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC)) in updateDeviceRoute() 428 int devices = mAudioManager.getDevicesForStream(AudioManager.STREAM_MUSIC); in updateVolume() 429 int volume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); in updateVolume()
|
/frameworks/base/services/core/java/com/android/server/policy/ |
D | LegacyGlobalActions.java | 100 private final AudioManager mAudioManager; field in LegacyGlobalActions 129 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in LegacyGlobalActions() 223 mSilentModeAction = new SilentModeTriStateAction(mContext, mAudioManager, mHandler); in createDialog() 597 mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_NORMAL; 646 mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT); 648 mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL); 667 private final AudioManager mAudioManager; 672 mAudioManager = audioManager; 697 int selectedIndex = ringerModeToIndex(mAudioManager.getRingerMode()); 735 mAudioManager.setRingerMode(indexToRingerMode(index));
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/appops/ |
D | AppOpsControllerImpl.java | 80 private final AudioManager mAudioManager; field in AppOpsControllerImpl 128 mAudioManager = audioManager; in AppOpsControllerImpl() 149 mAudioManager.registerAudioRecordingCallback(mAudioRecordingCallback, mBGHandler); in setListening() 152 mMicMuted = mAudioManager.isMicrophoneMute() in setListening() 157 mAudioManager.getActiveRecordingConfigurations())); in setListening() 164 mAudioManager.unregisterAudioRecordingCallback(mAudioRecordingCallback); in setListening() 512 mMicMuted = mAudioManager.isMicrophoneMute() in onReceive() 523 mMicMuted = mAudioManager.isMicrophoneMute() || blocked; in onSensorBlockedChanged()
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | PhoneFallbackEventHandler.java | 49 AudioManager mAudioManager; field in PhoneFallbackEventHandler 304 if (mAudioManager == null) { in getAudioManager() 305 mAudioManager = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE); in getAudioManager() 307 return mAudioManager; in getAudioManager()
|