/frameworks/base/packages/SettingsLib/src/com/android/settingslib/volume/data/repository/ |
D | AudioRepository.kt | 97 private val audioManager: AudioManager, constant in com.android.settingslib.volume.data.repository.AudioRepositoryImpl 119 audioManager.addOnModeChangedListener(ConcurrentUtils.DIRECT_EXECUTOR, listener) in <lambda>() 120 awaitClose { audioManager.removeOnModeChangedListener(listener) } in <lambda>() 122 .onStart { emit(audioManager.mode) } in <lambda>() 124 .stateIn(coroutineScope, SharingStarted.WhileSubscribed(), audioManager.mode) 129 .map { RingerMode(audioManager.ringerModeInternal) } in <lambda>() 130 .onStart { emit(RingerMode(audioManager.ringerModeInternal)) } in <lambda>() 135 RingerMode(audioManager.ringerModeInternal), 142 audioManager.addOnCommunicationDeviceChangedListener( in <lambda>() 147 awaitClose { audioManager.removeOnCommunicationDeviceChangedListener(listener) } in <lambda>() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bluetooth/qsdialog/ |
D | DeviceItemFactoryTest.kt | 55 private val audioManager = context.getSystemService(AudioManager::class.java)!! constant 95 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_bondedAndNotConnected_returnsTrue() 105 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_connected_returnsFalse() 115 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_notBonded_returnsFalse() 129 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_exclusivelyManaged_returnsFalse() 139 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_noExclusiveManager_returnsTrue() 153 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_exclusiveManagerNotEnabled_returnsTrue() 167 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_exclusiveManagerNotInstalled_returnsTrue() 177 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_notExclusivelyManaged_notBonded_returnsFalse() 187 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_notExclusivelyManaged_connected_returnsFalse() [all …]
|
D | DeviceItemInteractorTest.kt | 66 @Mock private lateinit var audioManager: AudioManager in <lambda>() variable in com.android.systemui.bluetooth.qsdialog.DeviceItemInteractorTest 89 audioManager, in <lambda>() 224 audioManager: AudioManager in <lambda>()
|
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/ |
D | AudioRepositoryTest.kt | 63 @Mock private lateinit var audioManager: AudioManager variable in com.android.settingslib.volume.data.repository.AudioRepositoryTest 79 `when`(audioManager.mode).thenReturn(AudioManager.MODE_RINGTONE) in setup() 80 `when`(audioManager.communicationDevice).thenReturn(communicationDevice) in setup() 81 `when`(audioManager.getStreamMinVolume(anyInt())).thenReturn(MIN_VOLUME) in setup() 82 `when`(audioManager.getStreamMaxVolume(anyInt())).thenReturn(MAX_VOLUME) in setup() 83 `when`(audioManager.ringerModeInternal).thenReturn(AudioManager.RINGER_MODE_NORMAL) in setup() 84 `when`(audioManager.setStreamVolume(anyInt(), anyInt(), anyInt())).then { in setup() 90 `when`(audioManager.adjustStreamVolume(anyInt(), anyInt(), anyInt())).then { in setup() 95 `when`(audioManager.getStreamVolume(anyInt())).thenAnswer { in setup() 98 `when`(audioManager.isStreamAffectedByRingerMode(anyInt())).thenAnswer { in setup() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/ |
D | DeviceItemFactory.kt | 45 audioManager: AudioManager, in isFilterMatched() 83 audioManager: AudioManager in isFilterMatched() 86 BluetoothUtils.isAvailableMediaBluetoothDevice(cachedDevice, audioManager) in isFilterMatched() 108 audioManager: AudioManager in isFilterMatched() 132 audioManager: AudioManager in isFilterMatched() 143 audioManager: AudioManager in isFilterMatched() 146 BluetoothUtils.isAvailableMediaBluetoothDevice(cachedDevice, audioManager) in isFilterMatched() 167 audioManager: AudioManager in isFilterMatched() 178 audioManager: AudioManager in isFilterMatched() 182 BluetoothUtils.isConnectedBluetoothDevice(cachedDevice, audioManager) in isFilterMatched() [all …]
|
D | DeviceItemInteractor.kt | 50 private val audioManager: AudioManager, in <lambda>() constant in com.android.systemui.bluetooth.qsdialog.DeviceItemInteractor 136 .firstOrNull { it.isFilterMatched(context, cachedDevice, audioManager) } in <lambda>()
|
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/quickaffordance/ |
D | MuteQuickAffordanceConfigTest.kt | 55 private lateinit var audioManager: AudioManager variable in com.android.systemui.keyguard.data.quickaffordance.MuteQuickAffordanceConfigTest 80 audioManager, in setUp() 90 whenever(audioManager.isVolumeFixed).thenReturn(true) in <lambda>() 102 whenever(audioManager.isVolumeFixed).thenReturn(false) in <lambda>() 115 whenever(audioManager.ringerModeInternal).thenReturn(AudioManager.RINGER_MODE_NORMAL) in <lambda>() 117 whenever(audioManager.ringerModeInternal).thenReturn(AudioManager.RINGER_MODE_SILENT) in <lambda>() 122 verify(audioManager, times(2)).ringerModeInternal = ringerModeCapture.capture() in <lambda>() 133 whenever(audioManager.ringerModeInternal).thenReturn(AudioManager.RINGER_MODE_NORMAL) in <lambda>() 138 verify(audioManager).ringerModeInternal = ringerModeCapture.capture() in <lambda>()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ |
D | AudioManagerUnitTest.java | 54 AudioManager audioManager = new AudioManager(defaultDeviceContext); in testAudioManager_playSoundWithDefaultDeviceContext() local 56 audioManager.playSoundEffect(FX_KEY_CLICK); in testAudioManager_playSoundWithDefaultDeviceContext() 68 AudioManager audioManager = new AudioManager(defaultDeviceContext); in testAudioManager_playSoundWithVirtualDeviceContextDefaultPolicy() local 70 audioManager.playSoundEffect(FX_KEY_CLICK); in testAudioManager_playSoundWithVirtualDeviceContextDefaultPolicy() 82 AudioManager audioManager = new AudioManager(defaultDeviceContext); in testAudioManager_playSoundWithVirtualDeviceContextCustomPolicy() local 84 audioManager.playSoundEffect(FX_KEY_CLICK); in testAudioManager_playSoundWithVirtualDeviceContextCustomPolicy()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/muteawait/ |
D | MediaMuteAwaitConnectionManagerTest.kt | 51 private lateinit var audioManager: AudioManager variable in com.android.systemui.media.muteawait.MediaMuteAwaitConnectionManagerTest 63 context.addMockSystemService(Context.AUDIO_SERVICE, audioManager) in setUp() 78 verify(audioManager, never()).registerMuteAwaitConnectionCallback(any(), any()) in constructor_audioManagerCallbackNotRegistered() 85 verify(audioManager).registerMuteAwaitConnectionCallback(any(), any()) in startListening_audioManagerCallbackRegistered() 92 verify(audioManager).unregisterMuteAwaitConnectionCallback(any()) in stopListening_audioManagerCallbackUnregistered() 97 whenever(audioManager.mutingExpectedDevice).thenReturn(null) in startListening_audioManagerHasNoMuteAwaitDevice_localMediaMangerNotNotified() 106 whenever(audioManager.mutingExpectedDevice).thenReturn(DEVICE) in startListening_audioManagerHasMuteAwaitDevice_localMediaMangerNotified() 229 verify(audioManager).registerMuteAwaitConnectionCallback(any(), listenerCaptor.capture()) in getMuteAwaitListener()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/muteawait/ |
D | MediaMuteAwaitConnectionManager.kt | 46 val audioManager: AudioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager constant in com.android.systemui.media.muteawait.MediaMuteAwaitConnectionManager 79 audioManager.registerMuteAwaitConnectionCallback( in startListening() 82 val currentDevice = audioManager.mutingExpectedDevice in startListening() 93 audioManager.unregisterMuteAwaitConnectionCallback(muteAwaitConnectionChangeListener) in stopListening()
|
D | MediaMuteAwaitConnectionCli.kt | 39 private val audioManager: AudioManager, constant in com.android.systemui.media.muteawait.MediaMuteAwaitConnectionCli 60 audioManager.muteAwaitConnection( in execute() 63 CANCEL -> audioManager.cancelMuteAwaitConnection(device) in execute()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/ |
D | MuteQuickAffordanceConfig.kt | 58 private val audioManager: AudioManager, in <lambda>() constant in com.android.systemui.keyguard.data.quickaffordance.MuteQuickAffordanceConfig 86 audioManager.isVolumeFixed -> in <lambda>() 108 val currentRingerMode = audioManager.ringerModeInternal in <lambda>() 117 audioManager.ringerModeInternal = newRingerMode in <lambda>() 125 if (audioManager.isVolumeFixed) { in <lambda>()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/ |
D | RingerModeTrackerImpl.kt | 35 audioManager: AudioManager, 44 audioManager::getRingerMode 51 audioManager::getRingerModeInternal
|
/frameworks/base/packages/SystemUI/accessibility/accessibilitymenu/tests/src/com/android/systemui/accessibility/accessibilitymenu/tests/ |
D | AccessibilityMenuServiceTest.java | 307 AudioManager audioManager = context.getSystemService(AudioManager.class); in testAdjustVolume() local 308 int resetVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC); in testAdjustVolume() 317 int min = audioManager.getStreamMinVolume(AudioManager.STREAM_MUSIC); in testAdjustVolume() 318 audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, min, in testAdjustVolume() 322 () -> audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) == min); in testAdjustVolume() 326 () -> audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) > min); in testAdjustVolume() 328 int max = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in testAdjustVolume() 329 audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, max, in testAdjustVolume() 333 () -> audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) == max); in testAdjustVolume() 337 () -> audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) < max); in testAdjustVolume() [all …]
|
/frameworks/base/services/core/java/com/android/server/media/ |
D | DeviceRouteController.java | 54 AudioManager audioManager = context.getSystemService(AudioManager.class); in createInstance() local 70 audioManager, in createInstance() 80 context, audioManager, audioService, onDeviceRouteChangedListener); in createInstance()
|
D | LegacyDeviceRouteController.java | 81 @NonNull AudioManager audioManager, in LegacyDeviceRouteController() argument 85 Objects.requireNonNull(audioManager); in LegacyDeviceRouteController() 92 mAudioManager = audioManager; in LegacyDeviceRouteController()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/dagger/ |
D | SpatializerModule.kt | 39 audioManager: AudioManager, 40 ): Spatializer = audioManager.spatializer
|
D | AudioModule.kt | 57 audioManager: AudioManager, 64 audioManager,
|
/frameworks/base/services/core/java/com/android/server/hdmi/ |
D | VolumeControlAction.java | 162 AudioManagerWrapper audioManager = tv().getService().getAudioManager(); in shouldUpdateAudioVolume() local 163 int currentVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC); in shouldUpdateAudioVolume() 165 int maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in shouldUpdateAudioVolume()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/ |
D | NotificationPlayer.java | 92 AudioManager audioManager = in run() local 111 if (!audioManager.isMusicActiveRemotely()) { in run() 119 mNotificationRampTimeMs = audioManager.getFocusRampTimeMs( in run() 121 audioManager.requestAudioFocus(null, mCmd.attributes, in run() 123 mAudioManagerWithAudioFocus = audioManager; in run()
|
/frameworks/base/core/java/android/companion/virtual/audio/ |
D | VirtualAudioSession.java | 262 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in createAudioStreams() local 263 if (audioManager.registerAudioPolicy(mAudioPolicy) == AudioManager.ERROR) { in createAudioStreams() 294 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in releaseAudioStreams() local 295 audioManager.unregisterAudioPolicy(mAudioPolicy); in releaseAudioStreams()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/ |
D | SafetyWarningDialog.java | 46 public SafetyWarningDialog(Context context, AudioManager audioManager) { in SafetyWarningDialog() argument 49 mAudioManager = audioManager; in SafetyWarningDialog()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/systemsounds/ |
D | HomeSoundEffectController.java | 64 AudioManager audioManager, in HomeSoundEffectController() argument 68 mAudioManager = audioManager; in HomeSoundEffectController()
|
/frameworks/base/media/tests/LoudnessCodecApiTest/src/com/android/loudnesscodecapitest/ |
D | LoudnessCodecControllerTest.java | 89 final AudioManager audioManager = (AudioManager) context.getSystemService( in setUp() local 92 if (audioManager != null) { in setUp() 93 mSessionId = audioManager.generateAudioSessionId(); in setUp()
|
/frameworks/base/services/core/java/com/android/server/audio/ |
D | SoundEffectsHelper.java | 403 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in loadSoundAssets() local 404 if (audioManager != null && navigationRepeatFxParsed) { in loadSoundAssets() 405 audioManager.setNavigationRepeatSoundEffectsEnabled(true); in loadSoundAssets() 407 if (audioManager != null && homeSoundParsed) { in loadSoundAssets() 408 audioManager.setHomeSoundEffectEnabled(true); in loadSoundAssets()
|